PDA

View Full Version : AllowBlank: True all TextField



woeisiong
17 Aug 2009, 11:54 PM
I wonder is there any fastest way to modified all existing TextField property to set the allowBlank: true. Else I need to search page by page to replace the script >.<

StuartAshworth
18 Aug 2009, 12:20 AM
If your fields are in Fieldsets there is a "defaults" config option that can choose defaults for the form items to save setting them everytime.




...
defaults: { width: 200,
allowBlank: true
}
...

woeisiong
18 Aug 2009, 12:39 AM
Thank for your reply. Unfortunately all those controls are added as a normal control by using the renderTo config.

Animal
18 Aug 2009, 2:24 AM
Ext.form.TextField.prototype.allowBlank = true;