|
The basic core thing to grasp with ProForm is that it is designed to allow you to control the HTML of your site without any interference. In order to do this, it’s default tag provides a huge number of options and pieces of data for each field so you can render the HTML exactly how you want to.
Of course ProForm also provides a simple tag which can be used to render a form, but that tag doesn’t currently provide the same number of options as the full form tag. If you need to customize how your form behaves - the full form tag is the correct way to do so.
The best way to understand how ProForm handles form rendering is to read through the three sections of the full form tag’s crash course documentation, which is interleaved in the full form tag’s documentation (look for the Crash Course boxes).
I’ll also outline the steps here:
The form=“form_name” parameter tells the {exp:proform:form} tag what form you want to get fields for. This parameter’s documentation page also contains information on how to use an embed template to make reusing your custom template code a lot easier.
You will also want to use the thank_you_url=“some/url/here” parameter to send them to your custom thank you page.
Once inside the form, you are given a set of rows with fields inside them, represented by the {fieldset} loop: http://metasushi.com/documentation/proform/tags/form.html#var_fieldrows
Inside of the {fieldset} loop, there is a {fields} loop which provides the label, name, and many other settings for each field as they have been set in the form builder.
The form rendering process is shown fully functional in the sample template as well. Combine this with an embed template (or just call the template tag directly if you don’t care about reusing the code), and you’ll be on your way.
|