You can't remove or modify the main structure of the form without hacking the plugin and you don't want to do that. You CAN however, use strategically placed HTML blocks inline to add markup - splitting the main list into multiple lists and adding divs or other containers around them. Here's an example.
First HTML Block:
</li><!-- close the html field li -->
</ul><!-- close the list -->
<div id="form_section_1"><!-- open the first div container -->
<ul><!-- reopen the list -->
Add fields for first section here
Second HTML Block:
</li><!-- close the html field li -->
</ul><!-- close the list -->
</div><!-- close the first div container -->
<div id="form_section_2"><!-- open the second div container -->
<ul><!-- reopen the list -->
Add fields for second section here
Last HTML Block:
</li><!-- close the html field li -->
</ul><!-- close the list -->
</div><!-- close the second div container -->
Since the HTML block is in a <li > itself, you have to close that first, then close the list. After that you can introduce new markup to go between/around the lists, then re-open the list to start the new section. The last HTML block would close the last list and any open containers. Note: remember to check the "disable default margins" option for the HTML fields in the admin.
Hope that helps
One last note, Gravity Forms 1.5 should launch sometime within the next couple of weeks and it includes multi-page form support so you could also use that to break a long form into "pages" to tidy things up. It just depends on how immediate your need is I guess.
Posted 15 years ago on Wednesday November 3, 2010 |
Permalink