• Resolved Lobsterdm

    (@lobsterdm)


    Hi,

    I’m using your plugin to pre-popluate an event booking form and want to pull values from the url querystrings into various fields on the page but i only seem to be able to pull one value from the url.

    For example the url testsite.com/bookingform/?eventname works when i just want to get the event name and populate a field in the form

    but I want more than one value so testsite.com/bookingform/?event=eventname&leader=leadersname&date=eventdate

    so i can populate multiple fields such as

    event : [eventname]
    leader name : [leadersname]
    event date : [eventdate]

    Is this possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Tessa (they/them), AuRise Creative

    (@tessawatkinsllc)

    Yes, you can absolutely do that using the CF7_GET shortcode. Using your example, the shortcodes in the form edit template would look like this:

    event: [dynamictext event "CF7_GET key='event'"]
    leader name: [dynamictext leader "CF7_GET key='leader'"]
    event date: [dynamictext date "CF7_GET key='date'"]

    The value that goes into the key='<key value>' is the key used in your query ?event=eventname&leader=leadersname&date=eventdate

    I have a demo of that functionality here.

    If only one value is being pulled, and that value is the first value, it might be because there is a character in the event’s name affecting the query, like an ampersand or question mark. Please double check that those values are URL encoded too ??

    Let me know if that helps!

    Plugin Author Tessa (they/them), AuRise Creative

    (@tessawatkinsllc)

    I’m marking this resolved due to inactivity. Take care!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multiple query values in url’ is closed to new replies.