Multiple forms

Multiple forms

You may want to have more than one form on the same site but with different fields. Such as a register form and a contact form. To do that, set up the first form as instructed in the installation guide. To make the second form, copy the HTML for the Quform again into the body of the page that you want your second form on and customise your new form as described in the Customising your form page. Then make a copy of the quform/process.php file and call it something else, for example quform/process-register.php. That file you should customise with the fields for your register form as described in the Customising your form page. You should then change the action attribute of your register form so that it now points to your new file e.g.

1
<form class="quform" action="quform/process-register.php" ...
<form class="quform" action="quform/process-register.php" ...

Multiple forms on the same page

To have more than one Quform on the same page, just copy the HTML for the Quform again and paste it into another area of your page. You will then need to create a new config file and change the form action attribute as described in the section Multiple forms above. There is only one issue and that is that the form elements in the Quform have an id="" attribute, so when you have more than one element with the same id on a page, it is no longer valid HTML, however the form will still work. If you want your page to pass W3C validation then you should change or remove the id attributes for the elements in the second form or change the name of the elements with the same id to something else.

Still having trouble? Head over to the forums.

Forums