PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Wedding RSVP - Dynamic Population

  1. I'm making a RSVP for my wedding website. All guests will be emailed with the link to my RSVP page,
    http://michelleandalan.com/rsvp-test/ and a unique password for the RSVP form.

    I would like to create a field called Password at the start of the form. Then my guests would enter in the unique password they receive in their emails. This unique password would dynamically fill in their name in the name field and the number of guests they have.

    Is this possible using Dynamic Population as per this page, http://www.gravityhelp.com/documentation/page/Using_Dynamic_Population ?

    Any thoughts on how to do this?

    Posted 11 years ago on Thursday February 7, 2013 | Permalink
  2. Depending on the number of guests, I think I would handle this in a database table. Your key would be the unique password (their ID) and you can use that to retrieve all the related information.

    I would probably do it with two forms. The first form asks just for the password. You compare the value they enter with the database. If there is a match, you return all their data, and send it to form two. If there is no match, you return a validation error. I've never done something like this in its entirety, but I've done all the parts of it already,

    Here is querying a database to return a record:
    http://pastebin.com/8BxAPgka

    Here is validating an entered value compared to a value in a file (you could use a file or database):
    http://pastebin.com/8LaYuDZs

    Here is validating a 9 digit code before sending the visitor on their way:
    http://pastebin.com/7ANQh6Rc

    All the pieces are possible, you just have to tie it all together.

    Posted 11 years ago on Friday February 8, 2013 | Permalink
  3. Thanks Chris for your reply! I agree and I have a few questions about how to set up this database and how to allow my forms to connect to it.

    I have created the password form page here: http://michelleandalan.com/password/
    How do I connect it to the database? Do I assign it a parameter name under the "Allow field to be populated dynamically"? How do I edit the form so that it checks the database?

    I have created the RSVP form here: http://michelleandalan.com/rsvp-test/
    How do I edit this form so that it will check the values in the database? I see your pastebin.com codes but I don't quite know where to put that code or how to set up the database. Is there any additional code I need to write in order to tie it all together?

    I don't have the greatest knowledge of PHP but I can manipulate the code a bit, I just need a bit of direction. Any help would be much appreciated!

    Posted 11 years ago on Monday February 11, 2013 | Permalink
  4. Hi Chris, I was able to understand how to pass a query string from one form to another using this: http://www.gravityhelp.com/forums/topic/tutorial-two-stage-form-with-data-passed-by-query-string.

    But I'm not quite sure how to handle setting up the database as you mentioned in your Feb. 8th reply. Can you please clarify as to where to put the code snippets you provided me?

    Posted 11 years ago on Wednesday February 13, 2013 | Permalink
  5. I have the password form complete and set up as I was able to find this page http://www.gravityhelp.com/forums/topic/database-look-up-validation to help.

    Now with this form, http://michelleandalan.com/rsvp-test/?password=3934, I want to use a database (csv or text file) in order to fill in the 4 guest names. I have a hidden field titled password which shows the 4 digit password from the previous form, now I need to use that 4 digit code.

    How do I set up the text or csv database? Would the text/csv database look like this?
    password name1 name2 name 3 name 4
    3394 joe sarah kim dale
    2838 john marg
    Do you have a sample text/csv file that works with the pastebin.com code snippets from above? Or do I have to delim it with commas or columns in excel?

    Lastly, how do I get the name fields to be dynamically populated by the names corresponding to the password database?

    Posted 11 years ago on Thursday February 14, 2013 | Permalink
  6. Alan, I responded to your email.

    Posted 11 years ago on Friday February 15, 2013 | Permalink
  7. Alan and I came up with this code: http://pastebin.com/dMkm9NGR

    Please feel free to ask questions if you need help using this code.

    Posted 11 years ago on Friday March 1, 2013 | Permalink