Is it possible to create a form on a separate site that will pass information to a NationBuilder signup page via query string?
E.g. I build a simple form asking for first name, last name, and email address. Can that form take to the user to a NationBuilder form with those pieces of data filled in? I've tried guessing at the variables, but no luck. I'm looking for something like:
http://abc.nationbuilder.com/signup?first_name=john&last_name=doe&[email protected]
Official response from Taylor Pineiro
Please see below.
Share this post
Showing 2 reactions
Sign in with
This can be achieved with JavaScript. You’ll first need to grab and parse the query string – here’s a simple tutorial on how to get a JavaScript object of your URL parameters: http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html
The second part is setting the value of the parameter you want to the form field you’re targeting, which you can do via jQuery’s .val() method:
$(‘#form-field-id’).val($.getUrlVar(‘name’));