Johan Solve Heads up about a recent change in form->renderform
Dec 14, 2007; 09:33
Johan Solve
Heads up about a recent change in form->renderform
>2007-11-13 JS Added -buttontemplate to be able to specify separate template for buttons, defaults to no <br>, but if template has been specified that will be used instead (for backwards compatibility)
This means that the default template for submit buttons is now just "#field#" instead of "#label# #field##required#<br>". This change was made so that multiple submit buttons appear next to each other instead of on separate lines. It also prevents an empty pointless <label> html element for each submit button, which caused a warning at least for Tidy's html syntax check. Better html semantics.
Previously, to get multiple submit buttons next to each other on the same line you had to render the html form partially and change the html template before rendering the submits and the end of the form. But now you can render the entire form at once and still get the submits properly aligned.
A consequence of this change is that if you render a form without setting a template, the first submit button will appear at the left edge of the form instead of indented as the rest of the fields.
To fix this, add the css class indent to the first submit button. $form -> (addfield: -type='submit', -name='button_save', -value='Save', -class='first');
This of course assumes that you have a css class .first specified with a suitable margin-left - the form.css included in the Knop example pack has this.
Any following submit buttons in the same form do not need this change.
-- Johan Sölve [FSA Member, Lasso Partner] Web Application/Lasso/FileMaker Developer MONTANIA SOFTWARE & SOLUTIONS http://www.montania.se mailto:joh-n@montania.se (spam-safe email address, replace '-' with 'a')
############################################################# This message is sent to you because you are subscribed to the mailing list <knop@lists.montania.se>. To unsubscribe, E-mail to: <knop-off@lists.montania.se> Send administrative queries to <knop-request@lists.montania.se> List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html Project homepage http://montania.se/projects/knop/ Google Code has the latest downloads at http://code.google.com/p/knop/
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!