To fill in values of parameters from a URL into Form Maker fields, it is necessary to implement a few lines of custom JavaScript. Please navigate to Form Options > Javascript page and add the following code inside before_load() function:
function getParameterByName(name, url) {
if (!url) {
url = window.location.href;
}
name = name.replace(/[[]]/g, "$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace('/+/g', " "));
}
jQuery("#{{field_id}}").val(getParameterByName("{{param_name}}"));
jQuery("#{{field_id}}").attr("class", "input_active");
Where {{field_id}} is the ID of the field you wish to pre-fill. Also, {{param_name}} is the name of the parameter in the URL. You can get this information by inspecting form elements from your form page.
10Web Help Center
Hi, how can we help?