fastcodejava
fastcodejava

Reputation: 41117

Dependent field in EXT JS

Does EXT JS provide a mechanism for dependent fields? E.g. password field should not be active until the login has been entered.

Upvotes: 9

Views: 899

Answers (2)

sra
sra

Reputation: 23983

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.

Upvotes: 4

pllee
pllee

Reputation: 3959

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.

Upvotes: 2

Related Questions