Where this wasn't possible with 1.x, is it yet possible to add/remove fields on the fly (post-render) with 2.0?
Thanks!
Alex
Take a look at the function render in file Component.js. There is argument position but I've never tried.
Take this as a hint only...;)
doLayout does the trick - thanks Saki.
On a related note, can we only append fields to a form, and not at a specific position?
Something like:
"addAt( field, position )"
would be great. Sometimes fields need a specific ordering...
Alright, something like this works as far as addition goes:
"http://www.w3.org/TR/html4/loose.dtd">
Form Field Removal?
Seems the component.insert( index, component ) method does the trick. Now to find a crafty means to devise a form manager so that we can have an insertBefore/insertAfter :)
Cheers!
Alex
I should be (not tested): form.add(a-field-instance). Maybe you need to call form.doLayout() then.