开发者

Dependent field in EXT JS

Does EXT JS provide a mechanism for dependent fi开发者_C百科elds? E.g. password field should not be active until the login has been entered.


No, there is no buildin way to do this. But you can help yourself while using customValidator or any other event that fit your trigger-needs.

Modify the custom Validator on your username field to activates the disabled password field after the minimum username characters are reached.

Benefit of the customValidator is that it get's triggered while you type.


I know there was a formBind config option in Ext 3.3 and it says there is someting in 4.0 but the docs aren't very good now. It works well with buttons but I've never used them on fields before.

per ExtJS API :

Any component within the FormPanel can be configured with formBind: true. This will cause that component to be automatically disabled when the form is invalid, and enabled when it is valid. This is most commonly used for Button components to prevent submitting the form in an invalid state, but can be used on any component type.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜