Capture UTMs using Formstack forms (V4)
This form is only compatible with HandL UTM Grabber V3.
Please add the hidden fields as outlined below. Ensure that the hidden field name (either the field label or placeholder) exactly matches our naming convention detailed here: Native WP Shortcodes.
AsAdd Embed Code
in FormStack at the top of versionyour 3.0.59, you do not need to perform any additional steps, as Formstack V4 is natively supported.
If you are using HandL UTM Grabber 3.0.58form and below. Then proceed withinclude the following step:
Uponthere. activatingMake thesure UTMto Grabberreplace V3<FORM
plugin,ID>insert the following code intowith your customown JavaScriptform file:id
setTimeout(function(<script>
var form = window.fsApi().getForm(<FORM ID>);
form.registerFormEventListener({
type: 'ready',
onFormEvent: function (event) {
if (window.handl_utm_all_params){
handl_utm_all_params.map(function(v){
var element = document.querySelector('.fsForm [placeholder="'+v+'"]')
if (element){
var curVal = Cookies.get(v) ?? "";
var eventfield_id = new Event(element.getAttribute('input', { bubbles: true }data-fs-field-id')
var previousValuedest_field = element.valueform.getField(field_id);
element.value = curVal
element._valueTracker.dest_field.setValue(previousValue)
element.dispatchEvent(event)curVal);
}
})
},
500)return Promise.resolve(event);
}
});
</script>
This code will automatically populate the fields after a lead is submitted.