PDA

View Full Version : Converting "plain old" HTML-Form Input to nice Ext Forms



Preston
24 Apr 2007, 12:11 PM
Hi everybody,

I just converted an old plain and boring HTML Combo Box of mine into a new Ext Combo Box, using the:

"transform : String/HTMLElement/Element ComboBox"

Method of Class Ext.form.ComboBox.

Now i am already looking for over an hour on how to do the same with my other, old pure "text" input fields. I want them to have those Killer-Error Handling routines that Ext provides, completely with the Red Icon, to get rid of the Alert boxes I have at the moment.

Unfortunately the Class Ext.form.TextField class has no such "Transform" Method, which I could use, so that my existing HTML form mark-up is enhanced in an unobtrusive way (I have massive forms, so transforming them in a similar way as the Checkbox is the only way to go for me).

Is there a way to pimp my other old form elements just like the Check-Box?

Any hint is appreciated.
BtW: I love Ext! :)

Preston
24 Apr 2007, 12:23 PM
Ok here is how it is done:

http://extjs.com/forum/showthread.php?t=5078&highlight=autoCreate


Thank you forum :)

tryanDLS
24 Apr 2007, 12:48 PM
If you autocreate, aren't you adding a duplicate element? I think you want to use the applyTo method which uses an existing dom element to build the Textfield.

Preston
24 Apr 2007, 1:04 PM
Hi tryanDLS and everybody else,

yeah that