Prefilling input values is broken
-
Your documentation specifies how form values can be prefilled:
https://help.formassembly.com/help/prefill-through-the-url
This was especially useful for one of our clients, who had a key hidden field that needed a value for forms to function correctly.
To achieve this, we were using the shortcode to inject the custom values via query parameters (as outlined in the docs page above), e.g.
[formassembly formid=123456?customid=abc123 server="https://example.tfaforms.net"]Unfortunately the most recent plugin update has broken this. This is because you have implemented validation that converts “formid” into an integer.
Line 61 of
wp-content/plugins/formassembly-web-forms/wp_formassembly.php:$fa_id = absint($atts['formid']);And Line 65 of
wp-content/plugins/formassembly-web-forms/wp_formassembly.php:$fa_id = absint($atts['workflowid']);Previously you were not using
absintI appreciate that adding this filtering/type checking is best practice, but there is currently no other way to pass through custom query parameters to forms embedded using the shortcode. This is a regression, as it is still possible to pass through custom query parameters when, for example, implementing a custom iframe embed for a form.
I would suggest that you add another custom attribute to the shortcode that allows for passing through custom query parameters to the form embed.
Is this project open source and on Github? If so I’d be happy to submit a PR for this issue if that is helpful.
The topic ‘Prefilling input values is broken’ is closed to new replies.