How to Use Query String Arguments
Query string arguments might seem a bit complicated, but it’s a useful and easy feature that lets you populate form fields with text before a customer has entered their own details.
You can use the text for suggestions, or to anticipate what your customer will write (for example, if you know their location, you can enter their state). It’s always possible for the customer to change the text afterwards.
For example, to automatically add your customer name and email to your subscribe form:
- Add a classic HTML form, and map it to your form input elements. Find out how to do that here.
- Once you have a form set up on your page, click the Forms button in the top toolbar, click HTML Forms in the left hand menu, and then click Query String Arguments.
- Enter a name for your argument, and click Add.
- Select the form field you want to apply it to from the Form Field dropdown (don’t forget, you’ll need to map your form input elements properly for your argument to show).
- Repeat steps 4-5 for each query string argument you want to add, then click Done. Save and publish your page.
To see your form in action, click on View Page, and add the query string to the end of your page’s URL.
NOTE: You would replace ‘Mac Donald’ and ‘firstname.lastname@example.org’ with your customer’s actual details: the values included in this URL show inside the form.
You can also add query string arguments for hidden fields if you need to collect the information just for yourself.
For example, if you want to run an affiliate program, you could add a hidden field named ‘affiliate’ to your form, and add a new argument called ‘affID’. You would then give your users an affiliate URL - for example, http://yourpage.convertri.com/pagepath?affID=abc - and the form they submit on that page would automatically send the affiliate ID along with their other details to your form service.