riostack
Forum Replies Created
-
Thank you. I confirmed the hook (forminator_custom_form_submit_before_set_fields) is present on the plugin file. However, we found a different workaround to get it working since using custom value hidden fields didn’t offer the flexibility we needed.
I appreciate this. Just wanted to clarify if the forminator_custom_form_submit_before_set_fields hook is available in all versions of Forminator or if it’s version-specific?
I’d prefer to keep the code and injection method private. However, as we’ve confirmed the injection is working and the data is being sent via the payload, the issue seems to lie in how Forminator is handling the fields as you mentioned.
Is there anything additional that needs to be done to ensure the data passes the server-side validation and security checks? I’ve worked with similar form providers and JS code injection should be a common feature.
To clarify, the default field types provided by Forminator alone don’t meet our requirements – specifically, the “query” field type alone isn’t sufficient for our needs.
Please let me know what you find out about why the payload data is being rejected by the system. Are you getting any errors messages on your system when these hidden fields are sent via the payload?
That looks correct, as the testing link I shared only had the GCLID field pre-filled in the URL, which matches your screenshot. I didn’t see any submission with the email “[email protected]” in the Forminator submissions, so I wasn’t able to verify if the GCLID field came through with your test submission.
Here’s what I’m seeing on my end:
Payload Data: https://imgur.com/XuvlrkU
Forminator Submission: https://imgur.com/t92fVVr
Is there any reason why the GCLID value isn’t showing up on the Forminator side even though it’s correctly displaying in the Payload data?
The hidden fields are being populated when users interact with the forms, not on page load. We’re injecting the hidden fields based on query parameters, with additional logic for cases where query parameters aren’t present in the URL. So, using the “query” type alone isn’t sufficient for our needs.
I’ve selected the “Custom Value” hidden field type in the form editor, which should give us the control we need to populate the values. The issue isn’t that the hidden fields aren’t being populated – if you interact with the form and check the console/HTML values, you’ll see the code injection is working correctly for all hidden fields.
The problem seems to be with Forminator not picking up these values, even though the hidden fields are properly shown in the HTML code before the form is submitted. It appears there’s a limitation in how Forminator is handling these values during the submission process, as the hidden field data isn’t being posted to Forminator.
Could it be that the code needs to trigger a change event, or do you have any other thoughts on what might be causing this?
Thanks,
Brandon