YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub
  [ 1 post ]

Greg Hinch

YUI Contributor

  • Username: greghinch
  • Joined: Wed Jun 03, 2009 10:49 am
  • Posts: 40
  • Location: Playa del Rey, CA , USA
  • Twitter: greghinch
  • GitHub: ghinch
  • Gists: ghinch
  • IRC: gr-eg
  • Offline
  • Profile

new form structure

Post Posted: Thu Jul 08, 2010 7:17 am
+0-
I've updated the copy of form in Github to make use of the WidgetParent/WidgetChild structure. This changes the way forms should be instantiated a bit. Firstly, rather than setting all your fields via the "fields" attribute, you now use the "children" attribute from WidgetParent. The "type" attribute of each field, if using a string shortcut, should be the full class name for that field, eg setting "text" before now becomes "TextField", and likewise "select" becomes "SelectField". In addition, I'm experimenting with setting the form node directly as the contentBox, so if you were instantiating the form with the "contentBox" attribute to be the element you want the form rendered into, please change that to "boundingBox" if that element was not already a form node, as otherwise there will be no actual form node rendered.

Again, all of these changes are in the Github repository linked from the gallery page, but have not yet been pushed to the CDN. I'm going to do some more work for backwards compatibility and bug testing before pushing the new code there. The example code on the main gallery page has been updated to reflect the new format, but the other examples which are linked to have not yet been changed.
  [ 1 post ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum