Forum OpenACS Development: Re: Form-builder display/edit modes

Collapse
Posted by Ola Hansson on
I'm looking at ad_form, and I see that there has been support for form sections since revision 1.1, actually, using this syntax:
ad_form -form {

    {-section "Section One"}
	{email_to:text(text)    {label "To"}    {html {size 30}} }

    {-section "Section Two"}
    {email_subject:text(text)    {label "Subject"}   {html {size 40}}
	spellcheck}
    {email_body:text(textarea)    {label "Body"}    {html {rows 10 cols 50}} }

} -on_submit {

        # send email

}
This has a little less typing to it when there are many elements in a section, but it's just a matter of taste. The oter way of specifying sections is Roberto's new way - http://brasileiro.net/code/forms/ .