• Resolved scamrwordpressadmin

    (@scamrwordpressadmin)


    Hi Michael,

    I’d like to ask for your thoughts & recommendations, if I might.

    I have users who go to our website to sign up for an event. Later I need to be able to query:
    1. By user name, in order to see what events they have signed up for,
    AND
    2. By event, to see who signed up for that event.

    A. Currently each event has it’s own unique form name, and the data is captured in the cfdb correctly. I can successfully check for duplicate submissions.

    OR

    B. Am I better off to create one form and capture the event name and user name (etc) for all events/users in that one form.

    It seems that A. is going to require some custom SQL coding?

    What are your thoughts on the best way to structure this in order to pull queries 1&2 above?

    Thanks!

    https://wordpress.org/plugins/contact-form-7-to-database-extension/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    (B) is your best choice, but you might get along OK with (A).

    In (A), if you want to use a shortcode to query all the forms for a name, then all all form names like:
    [cfdb-table form=”form1,form2,form3,form4″]
    That makes all those forms looks like one form.
    It helps if all forms have the same field for the name so you can set a filter on the shortcode like:
    [cfdb-table form=”form1,form2,form3,form4″ filter=”name=xxxx”]

    the downside of (A) is that you can’t search for an event in the filter.

    So (B) is a better choice because it ensures the same field names and gives you a field to search on for the event itself.

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Thanks Michael! Work using (B) is underway!

    I currently have 2 forms, one the user interacts with, selecting the event name via dropdown, and then the user’s name, phone, email are auto populated from their login. Behind the scenes (user can’t see) I have a second form with the event name and event particulars pre-populated. This is because I want the user to just select the event name from drop-down and then have the event date, and other particulars auto populate when a query is run. I don’t want to rely on the user to enter that info correctly.

    I set up a query using [cfdb-table form="form1,form2"], and when I query on an event, I do get the info from both tables. The only problem is that the results are on two separate rows in the query results table, each displaying that form’s particular info. Is there a way to combine the info from both tables into one line?

    Plugin Author Michael Simpson

    (@msimpson)

    Is there a way to combine the info from both tables into one line?

    You would have to code a transform to merge the data into one row.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Recommendation: one form name vs multiple forms’ is closed to new replies.