Ext JS 4: Change allowBlank at Run Time

Straight from the Ext JS 4 online docs and recorded here so I don’t lose it.

One strategy to set the allowBlank property at runtime:

var combo = Ext.getCmp('myCombo');
Ext.apply(combo, {allowBlank: false}, {});

From the docs at http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.field.Text-cfg-allowBlank

Advertisements

3 comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s