Title: Multiple forms?
Last modified: August 20, 2016

---

# Multiple forms?

 *  Resolved [2koCreative](https://wordpress.org/support/users/2kocreative/)
 * (@2kocreative)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms/)
 * Is it possible to have multiple forms on one site? I need a Registration Form
   and a Volunteer Form which each has very different data to collect. They can 
   have their own page. thanks!
 * [http://wordpress.org/extend/plugins/participants-database/](http://wordpress.org/extend/plugins/participants-database/)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/multiple-forms/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/multiple-forms/page/2/?output_format=md)

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351133)
 * 2koCreative,
 * To do this, you have to create two custom templates for your signup form. In 
   each template, you’d have to control which fields were presented, and also set
   up dummy values in hidden inputs for fields that weren’t presented but were required.
   Obviously, a good knowledge of PHP is required to pull this off.
 *  Thread Starter [2koCreative](https://wordpress.org/support/users/2kocreative/)
 * (@2kocreative)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351134)
 * Unfortunately I do not much PHP experience. Would you have any other workaround?
   Or even slightly more detailed instruction on how to create a 2nd template? thanks!
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351137)
 * This is a pretty deep customization of the plugin’s functioning, so it does demand
   some programming knowledge.
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351138)
 * I have an explanation of how to create custom templates here: [http://wordpress.org/extend/plugins/participants-database/other_notes/](http://wordpress.org/extend/plugins/participants-database/other_notes/)
 *  Thread Starter [2koCreative](https://wordpress.org/support/users/2kocreative/)
 * (@2kocreative)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351187)
 * Thank you! I was able to make the custom template per your instructions no problem.
 * Now do you have any basic instruction on how to edit the form questions in this
   new template? (i.e.: Do I have to work strictly in the backend php files, or 
   is it possible to edit this second template in the WP admin somehow?
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351189)
 * If you’ve got your templates in your theme directory (and you should), you can
   edit them in your them editor. (Appearance/editor)
 *  Thread Starter [2koCreative](https://wordpress.org/support/users/2kocreative/)
 * (@2kocreative)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351190)
 * ok, yes they are there. And I see where to edit them. Thanks. This will be my
   first time trying to edit my own php… so wish me luck! I guess I need to start
   learning this at some point! thanks for the guidance
 *  [teamlovedesign](https://wordpress.org/support/users/teamlovedesign/)
 * (@teamlovedesign)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351225)
 * xnau,
 * First off, thanks for all of your hard work in developing this plugin. I hope
   I can get it to work with two forms. Here’s what I’ve done so far.
 * 1. I duplicated a template and named it **pdb-signup-custom1.php and pdb-signup-
   custom2.php**.
 * SIDE NOTE: Where does the file: **pdb-signup-bootstrap.php** play in all of this?
 * 2. I have my shortcode on one page as: **[pdb_signup template=”custom1″], and
   on another page called [pdb_signup template=”custom2″]**.
 * 3. I created my database fields in field groups called “custom1 AND custom2”.
 * So, what code in the files: **pdb-signup-custom1.php AND pdb-signup-custom2.php**
   do I change to have my form fields assigned to my field group called “custom1
   AND custom2” appear on my page using the shortcodes **[pdb_signup template=”custom1″]
   AND [pdb_signup template=”custom2″]**… respectively?
 * I’m sure changing it on one template will apply for the other. I was just trying
   to be clear in asking my question.
 * I’m baffled, and any assistance would be greatly appreciated.
    Thanks.
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351237)
 * teamlovedesign,
 * The answer is not so simple. For your idea to work, each template must have it’s
   own way of determining which fields get shown. The plugin is not really set up
   to have multiple signups, so it’s a little complicated.
 * Here’s the general idea. Remember, you’ll have to adapt this to your situation,
   you won’t be able to just paste it in and expect it to work.
 * In the single template, after the `$this->the_field();` statement, put something
   like this, with “group_name” changed to the name of the group you want to show:
 * `<?php if ( $this->group->name == 'group_name' ) : ?>`
 * OK, now the template will go as usual…then just before `<?php endwhile; // fields`
   put:
 *     ```
       <?php else : 
   
                 if ( $this->field->validation == 'yes' ) echo '<input type="hidden" name="'.$this->field->name.'" value="0" />';
                 else if ( $this->field->name == 'email' ) echo '<input type="hidden" name="'.$this->field->name.'" value="dummy@email.com" />';
   
                 endif;
               ?>
       ```
   
 * What that is doing, is it’s inserting dummy values so that the fields that are
   not showing that need to be validated will pass validation. There is no way to
   turn off validation selectively in the template, so we have to do this. The ’
   email’ field is an example of the kind of thing you’ll have to do if you have
   other kinds of validation enabled.
 * The ‘bootstrap’ template is just an example of a different way of setting up 
   a template. The Twitter Bootstrap framework is something I’m interested in, so
   I created example templates that use that framework.
 *  [teamlovedesign](https://wordpress.org/support/users/teamlovedesign/)
 * (@teamlovedesign)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351238)
 * Awesome. This really gives me a foundation to work from. Thanks for taking the
   time to explain this to me. Much appreciated.
 *  [msones](https://wordpress.org/support/users/msones/)
 * (@msones)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351290)
 * xnau,
 * Beautiful work, thanks.
 * Quick question. I am creating templates for two sign up forms, but some of the
   fields overlap. How can I tell the template to pull from multiple groups?
 * For example, I need Template1 to use fields from GroupA and GroupC, and Template2
   to use fields from GroupB and GroupC.
 * I think i’m just missing an OR somewhere in the php, just not sure how/where 
   to include it. Thanks for the help!
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351291)
 * Simple stuff. You just do something like this:
 * `<?php if ( $this->group->name == 'groupA' or $this->group->name == 'groupC' ):?
   >`
 * Make sure you spell it right! I didn’t, probably.
 *  [msones](https://wordpress.org/support/users/msones/)
 * (@msones)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351292)
 * Got it! Thanks.
 *  [martinahawkins](https://wordpress.org/support/users/martinahawkins/)
 * (@martinahawkins)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351305)
 * I am trying to create similar templates. After I** insert
    <?php else :
 *  if ( $this->field->validation == ‘yes’ ) echo ‘<input type=”hidden” name=”‘.
   $this->field->name.'” value=”0″ />’;
    else if ( $this->field->name == ’email’)
   echo ‘<input type=”hidden” name=”‘.$this->field->name.'” value=”dummy@email.com”/
   >’;
 *  endif;
    ?>
 * I get the error
    ( ! ) PARSE ERROR: SYNTAX ERROR, UNEXPECTED T_ELSE IN /U0/WEBROOT/
   VIRTUAL/WWW.NEWCASTLEAC.ORG/WP-CONTENT/THEMES/MYTWENTYELEVEN/TEMPLATES/PDB-SIGNUP-
   LEITRIM.PHP ON LINE 68 CALL STACK
 * Could you be of any assistance with this error?
 *  [geoffreygordon](https://wordpress.org/support/users/geoffreygordon/)
 * (@geoffreygordon)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/multiple-forms/#post-3351306)
 * I have a question, can you use this plugin to perform this kind of function:
 * [http://saiw.co.za/national_register/index.php?q=search&type=certification](http://saiw.co.za/national_register/index.php?q=search&type=certification)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/multiple-forms/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/multiple-forms/page/2/?output_format=md)

The topic ‘Multiple forms?’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 18 replies
 * 8 participants
 * Last reply from: [Roland Barker](https://wordpress.org/support/users/xnau/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/multiple-forms/page/2/#post-3351346)
 * Status: resolved