Posted on by

Using Multiple Registration Forms

Let’s say you have a site where you want to register two types of people. We’ll call them “Red” and “Blue.” Each of those forms is going to have some fields in common and some fields that are different for each signup form.

The first thing to do is to organize your fields into groups. Field Groups are defined on the Manage Database Fields page under the “Field Groups” tab. One or more groups would contain all the fields that are common to both registration forms: things like name, address, email, etc.

Once you’ve got your common groups set up, you’ll need to set up at least one group for each form that contains the fields for the particular type of registration the form is for.

Tracking Which Form was Used

Since all the registrations will be contained in the same database, you’ll need an easy and reliable way to tell them apart. A good way to do this is to use a hidden field that records the name of the page the form is on.

Set up a hidden field in one of the common groups. You can name it “Form Type” or whatever you want that indicates that the value determines which form was used. In the “default” value for the hidden field, put “post->post_name” That will be automatically filled with the name of the page the form was on.

Setting Up the Signup Shortcodes

Once you have all your groups defined, set up your shortcodes. You’ll have one shortcode for each type of registration, and they will need to be on different pages. Setting up two different forms is done using the “groups” attribute of the shortcode.

Let’s say you have 3 field groups, one common one and one group for each type of registration form. We’ll call them “common,”  “red” and “blue.” When you set up the shortcodes, you can do it like this:

Red Form: [pdb_signup groups="common,red" ]

Blue Form: [pdb_signup groups="common,blue" ]

Telling the Registrations Apart

Now, when you list the registrations, you can easily show one or the other using a filter. Let’s say you wanted to show only the “Blue” registrations.  The blue form was on a page named “blue-registration” so you’d do it like this:

[pdb_list filter="form_type=blue-registration"]

And that would show all the records that were created using the “Blue” form.

That should get you started on your project that uses more than one kind of registration form.

55 thoughts on “Using Multiple Registration Forms

  1. I’m creating multiple registrations, as you’ve described. I have two groups: “basic info” and “vital records.” I’ve listed the fields in the order that I want them displayed on the signup form (a few from one group, a few from the other, back the first, etc.), but the form is displaying with the selected fields from the “basic info” group listed first, followed by the fields from “vital records.” Is it possible to force the fields to display the way I want them to?

    1. The signup form is organized by group, so it’s not possible to split fields from the same group with fields from another group.

      I can look into changing this, it’s always been this way, but maybe it’s something I can include in the next release.

      1. That would be great. Are there any plans to allow multiple instances of PDB on one site?

        1. Allowing multiple separate databases has been on the proposed feature list since the beginning, but I think the complexity of the undertaking and the list of more immediate feature upgrades has kept us from moving forward on that. So…a distant possibility.

  2. We have been using this plugin for some time so we have an established database. Works fine.

    Now we want to signup an entirely different group and use a different email to manage this list. Can each form signer be sent back to a different email?

    Is there any way to create a type for the first group and amend all the existing names? I assume we would amend the form and then export the entire list, manually add the type to all records and then import the list back to update it.

    The second list form would already contain a type field and begin collecting the data.

    1. The Email Expansion Kit provides an easy way to define multiple emails and control what event sends them. It’s also possible to do this with your own code using the pdb-before_signup_thanks action.

      You’re right about the best way to update a lot of records, export a CSV, edit it in a spreadsheet, then re-import, keying on the record ID.

      It’s also possible just assume that if the record does not have a value in the type field, it is of the first type.

  3. Hi
    I tried to create 2 separate registration forms. One form for universities to sign up and another form for students to sign up.
    University page is: student-exchange.org/universities/
    Student page is: student-exchange.org/students/

    Both forms are exactly the same. They dont change. If I tick the signup option for the field then they show up for both signup forms. Shouldnt [pdb_signup groups= "Students" ] show only the student form and not the university form?

    regards

    Ugur GUVEN

    1. When you are using the “groups” attribute make sure you using the name of the group, not the title of the group. Take a look on the Manage Database Fields page under the Field Groups tab to see what the correct name to use is.

    2. Hi

      When I did that then the website student-exchange.org/students/ shows just a button that says signup and not the form itself and when I click on that button it just says thank you for signing up thats all

      I used the name rather then the title as you said
      [pdb_signup groups= "students" ]

      1. On the Manage Database fields page, make sure that all the fields you want shown in the signup form have the “signup” checkbox checked.

  4. Hi, i need to create two different forms (as in your example “red” and “blue”).
    They are on two different pages and they share one of the field group, which is about personal informations.
    I created different field groups: every single one of them must be published only in the related group page, following the common group. So if i go to the “Professionals” signup page i should see: Personal informations (common), specific groups (professional details, categories etc). And not the others filed group dedicated to the other group of participants.
    To do that i’ve put the shortcode: [pdb_signup groups="anagrafica generale,categorie di specializzazione" ] in a page and the shortcode [pdb_signup groups="anagrafica generale,anagrafica ditta" ] in a different one.
    I also will need to add more specific field to both the shortcodes (is there a limit?).

    What happens is that when i open the pages the two signup forms are exactly the same and in both of them i see ALL the fields and the field groups i made, without distinction.

    Why is that?

    Some more informations:
    – I created the hidden field (post->post_name) in the common group
    – Every field i made is “signup checked” because i need the people to fill them from the beginning and not after they receive the private link.

    What can i do?

    Thank you.

    1. The “groups” attribute in the shortcode must use the group “name” not the title.

  5. Thanks for this explanation.
    My question is; how to set-up the conformation e-mail so people receive the correct confirmation information?

    1. If you want to use a different email for each one, you’ll need to use the Email Expansion Kit add-on so you can set up two confirmation emails, one for each form. The add-on has a feature where which email sent depends on the value in the submission.

    2. OK, you have a field in the submission that tells you which registration form was used…we will use that to determine which email template gets used to send the confirmation.

      In the Email Templates, you need two templates that are both triggered on the new registration. Each one will have the conditional send set up to look at the value in that field. You’ll be comparing against a fixed value, probably the name of the page the form was on, so each template will have a different fixed value to compare against.

      When the registration comes in, the value in the submission is matched with the value set up in the conditional send, and the template with the matching value will be used.

      I probably need to create a more detailed tutorial on this.

  6. What about the details page?
    Can you have a details page for each kind of form?
    What I mean is that when you have a single form, you can choose one of the fields to be clickable and to take you to a details page for that record, but if you have different forms, how can you accomplish that?
    thanks a lot

    1. The “detail” link is only shown in the list of records where you are showing only a brief selection of data for each record. The detail link takes them to the Single Record page to show them the full record. IF you want to have a different display based on the type of record (in other words, based on the value of a field in the record) you need to create a custom template that accomplishes that.

  7. Hi Roland,

    I created two different Field Groups, added a hidden field in one of the groups with the value post->post_name. Set up two registration shortcodes on each page for each field group: [pdb_signup groups=”sheshired”] and [pdb_signup groups=”main” template=bootstrap]. It all works fine here.

    But when i try filtering using the [pdb_list filter=”form_type=sheshired”] (name of the page the form is place on) it still shows the registrations for my main group. Have i missed something? In your tutorial you use 3 different groups, it cant be that im using just two groups instead?

    1. The first thing to check is to look at the HTML source of your registration forms, you should see the hidden field and it’s value should contain the name of the page. When that form is submitted, that value is included in the record so you can filter by it. If it’s not working, it’s probably because the hidden field isn’t present in the form (check the “signup” checkbox for that field), or it’s not correctly configured and doesn’t contain the post_name value.

      1. Hi, i’m so grateful for your help.

        I’m seeing the hidden field in the HTML source, but its value doesnt seem to contain the name of the page. I’ve also checked the signup checkbox, which is checked;

        https://ibb.co/bxXQq9.

        [pdb_signup groups="sheshired"] is the shortcode im using on a page called sheshired. It seems like im missing something obvious, but I feel like ive followed your tutorial to the tee.

        1. When configuring the hidden field, check that the post->post_name is in the “default” setting for the field.

Leave a Reply

Your email address will not be published. Required fields are marked *

Would you like to be notified of followup comments via e-mail? You can also subscribe without commenting.

55 thoughts on “Using Multiple Registration Forms

  1. I’m creating multiple registrations, as you’ve described. I have two groups: “basic info” and “vital records.” I’ve listed the fields in the order that I want them displayed on the signup form (a few from one group, a few from the other, back the first, etc.), but the form is displaying with the selected fields from the “basic info” group listed first, followed by the fields from “vital records.” Is it possible to force the fields to display the way I want them to?

    1. The signup form is organized by group, so it’s not possible to split fields from the same group with fields from another group.

      I can look into changing this, it’s always been this way, but maybe it’s something I can include in the next release.

      1. That would be great. Are there any plans to allow multiple instances of PDB on one site?

        1. Allowing multiple separate databases has been on the proposed feature list since the beginning, but I think the complexity of the undertaking and the list of more immediate feature upgrades has kept us from moving forward on that. So…a distant possibility.

  2. We have been using this plugin for some time so we have an established database. Works fine.

    Now we want to signup an entirely different group and use a different email to manage this list. Can each form signer be sent back to a different email?

    Is there any way to create a type for the first group and amend all the existing names? I assume we would amend the form and then export the entire list, manually add the type to all records and then import the list back to update it.

    The second list form would already contain a type field and begin collecting the data.

    1. The Email Expansion Kit provides an easy way to define multiple emails and control what event sends them. It’s also possible to do this with your own code using the pdb-before_signup_thanks action.

      You’re right about the best way to update a lot of records, export a CSV, edit it in a spreadsheet, then re-import, keying on the record ID.

      It’s also possible just assume that if the record does not have a value in the type field, it is of the first type.

  3. Hi
    I tried to create 2 separate registration forms. One form for universities to sign up and another form for students to sign up.
    University page is: student-exchange.org/universities/
    Student page is: student-exchange.org/students/

    Both forms are exactly the same. They dont change. If I tick the signup option for the field then they show up for both signup forms. Shouldnt [pdb_signup groups= "Students" ] show only the student form and not the university form?

    regards

    Ugur GUVEN

    1. When you are using the “groups” attribute make sure you using the name of the group, not the title of the group. Take a look on the Manage Database Fields page under the Field Groups tab to see what the correct name to use is.

    2. Hi

      When I did that then the website student-exchange.org/students/ shows just a button that says signup and not the form itself and when I click on that button it just says thank you for signing up thats all

      I used the name rather then the title as you said
      [pdb_signup groups= "students" ]

      1. On the Manage Database fields page, make sure that all the fields you want shown in the signup form have the “signup” checkbox checked.

  4. Hi, i need to create two different forms (as in your example “red” and “blue”).
    They are on two different pages and they share one of the field group, which is about personal informations.
    I created different field groups: every single one of them must be published only in the related group page, following the common group. So if i go to the “Professionals” signup page i should see: Personal informations (common), specific groups (professional details, categories etc). And not the others filed group dedicated to the other group of participants.
    To do that i’ve put the shortcode: [pdb_signup groups="anagrafica generale,categorie di specializzazione" ] in a page and the shortcode [pdb_signup groups="anagrafica generale,anagrafica ditta" ] in a different one.
    I also will need to add more specific field to both the shortcodes (is there a limit?).

    What happens is that when i open the pages the two signup forms are exactly the same and in both of them i see ALL the fields and the field groups i made, without distinction.

    Why is that?

    Some more informations:
    – I created the hidden field (post->post_name) in the common group
    – Every field i made is “signup checked” because i need the people to fill them from the beginning and not after they receive the private link.

    What can i do?

    Thank you.

    1. The “groups” attribute in the shortcode must use the group “name” not the title.

  5. Thanks for this explanation.
    My question is; how to set-up the conformation e-mail so people receive the correct confirmation information?

    1. If you want to use a different email for each one, you’ll need to use the Email Expansion Kit add-on so you can set up two confirmation emails, one for each form. The add-on has a feature where which email sent depends on the value in the submission.

    2. OK, you have a field in the submission that tells you which registration form was used…we will use that to determine which email template gets used to send the confirmation.

      In the Email Templates, you need two templates that are both triggered on the new registration. Each one will have the conditional send set up to look at the value in that field. You’ll be comparing against a fixed value, probably the name of the page the form was on, so each template will have a different fixed value to compare against.

      When the registration comes in, the value in the submission is matched with the value set up in the conditional send, and the template with the matching value will be used.

      I probably need to create a more detailed tutorial on this.

  6. What about the details page?
    Can you have a details page for each kind of form?
    What I mean is that when you have a single form, you can choose one of the fields to be clickable and to take you to a details page for that record, but if you have different forms, how can you accomplish that?
    thanks a lot

    1. The “detail” link is only shown in the list of records where you are showing only a brief selection of data for each record. The detail link takes them to the Single Record page to show them the full record. IF you want to have a different display based on the type of record (in other words, based on the value of a field in the record) you need to create a custom template that accomplishes that.

  7. Hi Roland,

    I created two different Field Groups, added a hidden field in one of the groups with the value post->post_name. Set up two registration shortcodes on each page for each field group: [pdb_signup groups=”sheshired”] and [pdb_signup groups=”main” template=bootstrap]. It all works fine here.

    But when i try filtering using the [pdb_list filter=”form_type=sheshired”] (name of the page the form is place on) it still shows the registrations for my main group. Have i missed something? In your tutorial you use 3 different groups, it cant be that im using just two groups instead?

    1. The first thing to check is to look at the HTML source of your registration forms, you should see the hidden field and it’s value should contain the name of the page. When that form is submitted, that value is included in the record so you can filter by it. If it’s not working, it’s probably because the hidden field isn’t present in the form (check the “signup” checkbox for that field), or it’s not correctly configured and doesn’t contain the post_name value.

      1. Hi, i’m so grateful for your help.

        I’m seeing the hidden field in the HTML source, but its value doesnt seem to contain the name of the page. I’ve also checked the signup checkbox, which is checked;

        https://ibb.co/bxXQq9.

        [pdb_signup groups="sheshired"] is the shortcode im using on a page called sheshired. It seems like im missing something obvious, but I feel like ive followed your tutorial to the tee.

        1. When configuring the hidden field, check that the post->post_name is in the “default” setting for the field.

Leave a Reply

Your email address will not be published. Required fields are marked *

Would you like to be notified of followup comments via e-mail? You can also subscribe without commenting.