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. Dear Roland,

    How can I provide my subscribes an unique ID, if for example they would inscribe next year back for a certain course, so they don’t need to fill in again address, phone and email or if they want to change their email address?
    And how can they access then their private record info and save their new data?
    kind regards
    Michael

    1. You can do this with the Participant Login add-on, set it up to get the ID number, then when the editable form is presented, existing data will already be in place. You can use the “groups” or “fields” attributes of the [pdb_record] shortcode to control which fields are shown to the user in the form.

  2. Hi. How or what would i need to add to the csv file i’d be importing to work with the separate groups ‘hidden field’ stuff etc?

    I’ve successfully uploaded a list of WW1 names and we need to add the WW2 separately – following the above advice.

    So what do i need to do to the csv file prior to import?

    1. The CSV import will accept any fields you want to import, as long as the fields are defined in the plugin. This means you can import as many or as few as you want, just make sure that the first line of the CSV names all the fields included in the import.

  3. How can I have a sign up form where the input is under the label and not next to the label? This would be a better responsive style markup

    1. Try using the bootstrap template: [pdb_signup template=bootstrap]

      1. thank you
        I tried to use post->post_name but when I load the database the field is empty, what am I doing wrong?

        1. The way this works is you set up a hidden field with “post->post_name” as it’s default value. Make sure that hidden field has “signup” checked so that it will be included in the signup form. To check that this is working, open the signup form page in your browser, then inspect the HTML. At the top of the form element, you will see the hidden fields, and your hidden field should be there, and you should see that it’s value is the name of the page the form is on. When that form is submitted, that value is saved.

      2. thank you for your reply about the post->post_name/ hidden field issue but it still not working, maybe it doesn’t work in the firefox browser

        1. It’s not related to the browser at all, the value come from WordPress and it does work if configured correctly. Are you placing the signup shortcode in regular page content…as opposed to a widget or something?

        2. I placed [pdb_signup groups="common"] in a regular page context without any widget evolved

          I also tried to change the database field (post_type) from hidden to text field and placed the post->post_name and/or post->post_name in the default field and in the value field,
          And marked post_type to be registered.

          When I look into the page source of the signup form and I don’t see the hidden field.

          I don’t understand what I am doing wrong?

        3. Glad you got it. Interesting that the name “post_type” didn’t work, I’ll have to investigate that.

        4. I found it, I changed the field name from post_type to another name and I used $post->post_title

      3. Dear Roland,

        I was wondering if there is an email checker plugin I can use that works with the forms of the participants database plugin?
        I received the last weeks annoying false inscriptions.

        Looking forward for your answer.

        greet
        Michael

        1. Are you using reCAPTCHA? That will take care of any automated submissions. If the submissions are from humans, it is possible, but a bit complicated to actually verify an email address. It takes time, so you have to do it in the background. I don’t have a plugin to will do this, I’m sorry.

  4. Hi Roland,

    Great plugin!
    I’m trying to get different signup forms for different user groups. Have added post->post_name (as “post->post_name”) as a field under one of the common groups in “Manage Database Fields”. Then added the shortcode [pdb_signup groups="common,red" ] to the signup pages for each user group. However I’m seeing Blue and Red data for Red users and Blue and Red data for Blue users on the signup E-Mail link where I would only want to see either Red or Blue data. Do you know how I can resolve this?
    Any help with this is hugely appreciated.
    Best Wishes,
    Frank

    1. If you want to have a different receipt email for each group, you need to use the Email Expansion Kit add-on.

  5. Hi Roland,

    Great plugin. I’m setting up a site that is running a “swimathon” this summer. Instead of “blue” and “red” I have “Pool 1” “Pool 2” etc. Getting the database to report a list of kids per each pool’s page is presenting a challenge.

    In the instructions above, you say “the form is on a page named “blue-registration” Where/how is the page name being define? I feel as if that’s the step I’m missing in order to fill out the short code:
    [pdb_list filter=”form_type=blue-registration”

    Thank you for your time and talents!

    1. The page is one you create and can have any name. The point is the name of the page is used to identify which form was used, and therefore what kind of registration it was.

  6. Firstly many thanks for this wonderful and very powerful plugin. My client need to give access to many people on a certain role so they can fill the a form with personal data from voters. Is it posibile that this people have access and be able to manage Only the forms they filled?.

    Many Thanks.

    Elias

    1. Yes, take a look at this article:

      Using Participants Database with WordPress Users

      1. Great!. and thanks for the quick reply.

  7. Hi Roland, I already have multiple registrations, with groups set up, and the plugin is working great, and I’m able to display only certain fields in multiple different list views, which is just what I need.

    However, I’m looking for a way to limit which fields are displayed in a single-view. Can I do that with just the one single-view template, or can I create multiple single-view templates to use for different Single-view pages?

    Or, maybe you have a better way to do this for single view pages linked from the list.

    Thanks!

    Gregg Davis

    1. Hi Gregg,

      There are several ways to do this. It’s probably easiest to do it in a custom single record template, you would first determine what kind of user it was, then set up which groups and/or fields are shown based on that.

  8. Is there a way to have “red” be an entry for a groups general information, and then on my “blue” form to have dropdown field that has an entry that selects from the “red” entries that have been created? For example: my “red” form is for a parent to enter their information. After a parent/adult has an entry I would use my “blue” form to input a child’s information. I want to have a dropdown list of parents (via checking existing records) on the “blue” form so I can connect the child to a specific adult, and attach multiple children to a single adult?

    1. John,

      Yes it’s possible, it requires some knowledge of PHP and using WordPress filters. You’ll need to write a function to alter the dropdown values so that they are drawn from the database. I can’t go into too much detail, and it’s not well documented in the API, but the filter you want to use is ‘pdb-before_display_form_input’ which passes in the field object before it’s displayed. You would be querying the database, then setting the “options” property of the field object with your values.

  9. Helpful discussion thread here, guidance and assistance is sought please…..
    My requirement is to create a 4 user type Registration Form that commences with standard common questions covering Name/s, Address, Landline No, Mobile No, Email. The 4 add-on forms would provide for 4 different kinds of user in the form of relevant supplementary questions. Confirmation that PD will facilitate such a multi registration platform would be appreciated.
    Thanking respondents in advance.

    1. Hi Peter,

      Given what I know from your question, I see no problem, but generally, implementing something of this complexity will require some custom code. As it stands, for instance, there is only one “thanks” email that can be sent, so if you require each type of signup to be handled differently with different messaging, you’re going to need custom code to achieve that.

      1. Roland
        Thanks for prompt response. I will assess coding challenges and naturally confirm if we proceed to use and support your plugin platform. Cheers Peter

  10. When the red user want to make some updates.. will see both forms ? red and blue ?

    1. The “red” and “blue” is two different kinds of user, not two individual users, so really it doesn’t work any differently for each user once they register. Each user will have their own private link to use to update their record.

      1. blue registration = [pdb_signup groups="main, personal"]
        red registration = [pdb_signup groups=”main”

        When i get the private link, as a red user.. i see forms from blue user.

        1. OK, if you need to have two different forms for that, you’ll need to set up a custom template for your [pdb_record] shortcode that checks on the type of record it is, then only shows the groups for that type. It will take a bit of coding to get that done.

          Using Participants Database Custom Templates

        2. Hi there,

          Did you find an answer for your question? I am stuck at the same issue, would appreciate the help.

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. Dear Roland,

    How can I provide my subscribes an unique ID, if for example they would inscribe next year back for a certain course, so they don’t need to fill in again address, phone and email or if they want to change their email address?
    And how can they access then their private record info and save their new data?
    kind regards
    Michael

    1. You can do this with the Participant Login add-on, set it up to get the ID number, then when the editable form is presented, existing data will already be in place. You can use the “groups” or “fields” attributes of the [pdb_record] shortcode to control which fields are shown to the user in the form.

  2. Hi. How or what would i need to add to the csv file i’d be importing to work with the separate groups ‘hidden field’ stuff etc?

    I’ve successfully uploaded a list of WW1 names and we need to add the WW2 separately – following the above advice.

    So what do i need to do to the csv file prior to import?

    1. The CSV import will accept any fields you want to import, as long as the fields are defined in the plugin. This means you can import as many or as few as you want, just make sure that the first line of the CSV names all the fields included in the import.

  3. How can I have a sign up form where the input is under the label and not next to the label? This would be a better responsive style markup

    1. Try using the bootstrap template: [pdb_signup template=bootstrap]

      1. thank you
        I tried to use post->post_name but when I load the database the field is empty, what am I doing wrong?

        1. The way this works is you set up a hidden field with “post->post_name” as it’s default value. Make sure that hidden field has “signup” checked so that it will be included in the signup form. To check that this is working, open the signup form page in your browser, then inspect the HTML. At the top of the form element, you will see the hidden fields, and your hidden field should be there, and you should see that it’s value is the name of the page the form is on. When that form is submitted, that value is saved.

      2. thank you for your reply about the post->post_name/ hidden field issue but it still not working, maybe it doesn’t work in the firefox browser

        1. It’s not related to the browser at all, the value come from WordPress and it does work if configured correctly. Are you placing the signup shortcode in regular page content…as opposed to a widget or something?

        2. I placed [pdb_signup groups="common"] in a regular page context without any widget evolved

          I also tried to change the database field (post_type) from hidden to text field and placed the post->post_name and/or post->post_name in the default field and in the value field,
          And marked post_type to be registered.

          When I look into the page source of the signup form and I don’t see the hidden field.

          I don’t understand what I am doing wrong?

        3. Glad you got it. Interesting that the name “post_type” didn’t work, I’ll have to investigate that.

        4. I found it, I changed the field name from post_type to another name and I used $post->post_title

      3. Dear Roland,

        I was wondering if there is an email checker plugin I can use that works with the forms of the participants database plugin?
        I received the last weeks annoying false inscriptions.

        Looking forward for your answer.

        greet
        Michael

        1. Are you using reCAPTCHA? That will take care of any automated submissions. If the submissions are from humans, it is possible, but a bit complicated to actually verify an email address. It takes time, so you have to do it in the background. I don’t have a plugin to will do this, I’m sorry.

  4. Hi Roland,

    Great plugin!
    I’m trying to get different signup forms for different user groups. Have added post->post_name (as “post->post_name”) as a field under one of the common groups in “Manage Database Fields”. Then added the shortcode [pdb_signup groups="common,red" ] to the signup pages for each user group. However I’m seeing Blue and Red data for Red users and Blue and Red data for Blue users on the signup E-Mail link where I would only want to see either Red or Blue data. Do you know how I can resolve this?
    Any help with this is hugely appreciated.
    Best Wishes,
    Frank

    1. If you want to have a different receipt email for each group, you need to use the Email Expansion Kit add-on.

  5. Hi Roland,

    Great plugin. I’m setting up a site that is running a “swimathon” this summer. Instead of “blue” and “red” I have “Pool 1” “Pool 2” etc. Getting the database to report a list of kids per each pool’s page is presenting a challenge.

    In the instructions above, you say “the form is on a page named “blue-registration” Where/how is the page name being define? I feel as if that’s the step I’m missing in order to fill out the short code:
    [pdb_list filter=”form_type=blue-registration”

    Thank you for your time and talents!

    1. The page is one you create and can have any name. The point is the name of the page is used to identify which form was used, and therefore what kind of registration it was.

  6. Firstly many thanks for this wonderful and very powerful plugin. My client need to give access to many people on a certain role so they can fill the a form with personal data from voters. Is it posibile that this people have access and be able to manage Only the forms they filled?.

    Many Thanks.

    Elias

    1. Yes, take a look at this article:

      Using Participants Database with WordPress Users

      1. Great!. and thanks for the quick reply.

  7. Hi Roland, I already have multiple registrations, with groups set up, and the plugin is working great, and I’m able to display only certain fields in multiple different list views, which is just what I need.

    However, I’m looking for a way to limit which fields are displayed in a single-view. Can I do that with just the one single-view template, or can I create multiple single-view templates to use for different Single-view pages?

    Or, maybe you have a better way to do this for single view pages linked from the list.

    Thanks!

    Gregg Davis

    1. Hi Gregg,

      There are several ways to do this. It’s probably easiest to do it in a custom single record template, you would first determine what kind of user it was, then set up which groups and/or fields are shown based on that.

  8. Is there a way to have “red” be an entry for a groups general information, and then on my “blue” form to have dropdown field that has an entry that selects from the “red” entries that have been created? For example: my “red” form is for a parent to enter their information. After a parent/adult has an entry I would use my “blue” form to input a child’s information. I want to have a dropdown list of parents (via checking existing records) on the “blue” form so I can connect the child to a specific adult, and attach multiple children to a single adult?

    1. John,

      Yes it’s possible, it requires some knowledge of PHP and using WordPress filters. You’ll need to write a function to alter the dropdown values so that they are drawn from the database. I can’t go into too much detail, and it’s not well documented in the API, but the filter you want to use is ‘pdb-before_display_form_input’ which passes in the field object before it’s displayed. You would be querying the database, then setting the “options” property of the field object with your values.

  9. Helpful discussion thread here, guidance and assistance is sought please…..
    My requirement is to create a 4 user type Registration Form that commences with standard common questions covering Name/s, Address, Landline No, Mobile No, Email. The 4 add-on forms would provide for 4 different kinds of user in the form of relevant supplementary questions. Confirmation that PD will facilitate such a multi registration platform would be appreciated.
    Thanking respondents in advance.

    1. Hi Peter,

      Given what I know from your question, I see no problem, but generally, implementing something of this complexity will require some custom code. As it stands, for instance, there is only one “thanks” email that can be sent, so if you require each type of signup to be handled differently with different messaging, you’re going to need custom code to achieve that.

      1. Roland
        Thanks for prompt response. I will assess coding challenges and naturally confirm if we proceed to use and support your plugin platform. Cheers Peter

  10. When the red user want to make some updates.. will see both forms ? red and blue ?

    1. The “red” and “blue” is two different kinds of user, not two individual users, so really it doesn’t work any differently for each user once they register. Each user will have their own private link to use to update their record.

      1. blue registration = [pdb_signup groups="main, personal"]
        red registration = [pdb_signup groups=”main”

        When i get the private link, as a red user.. i see forms from blue user.

        1. OK, if you need to have two different forms for that, you’ll need to set up a custom template for your [pdb_record] shortcode that checks on the type of record it is, then only shows the groups for that type. It will take a bit of coding to get that done.

          Using Participants Database Custom Templates

        2. Hi there,

          Did you find an answer for your question? I am stuck at the same issue, would appreciate the help.

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.