Hello,
We have recently purchased a Visforms Subscription and are using Visforms to replace our previous BreezingForms forms as part of our website migration from Joomla 3 to Joomla 6.We would appreciate your guidance regarding the use of URL parameters to populate default field values in forms embedded in articles using the vfformview content plugin.
Use case
We have a form embedded in an article as follows:
Code:
{vfformview}{"formid":"21","show_page_heading":"false"}{/vfformview}
Different pages on our website link to this article, passing dynamic values through URL parameters. A simplified example would be:
Code:
?description=Example&reference=123
These parameters should populate two form fields:
- field description: a read-only text field.
- field reference: a hidden field.
The "Allow URL Parameter" option is enabled for both fields.
Tests performed
We have successfully achieved the desired behaviour using a Visforms module and its corresponding prefix.
We have also managed to achieve the same behaviour directly with vfformview, using URL parameters in the following format:
Code:
?plgvfformview_bb0b4268field_description=Example&plgvfformview_bb0b4268field_reference=123
Both displaying the values and receiving them in the submission email work correctly, including values containing special characters.
However, after reviewing the plugin's source code, our understanding is that the hash used as part of the prefix may change depending on the plugin string, the article or the form processing order.
We have also consulted the documentation regarding urlparams and its placeholders, although we may have overlooked a configuration option.
Our question
Is there a built-in way to populate form fields dynamically from URL parameters when using vfformview, without having to include the generated hash in the links?
We are happy to adapt the names or format of the URL parameters if necessary.
Ideally, we would like to use the same embedding method for all our forms and rely on Visforms' built-in functionality wherever possible, to simplify maintenance and future updates.
If this is not currently supported, do you think it might be a useful feature to consider for future releases?
Our environment:
- Visforms: 6.2.3
- Visforms Subscription: 6.2.3
- Joomla: 6.1.4
- PHP: 8.3.6
Thank you very much in advance for your assistance and for your work on Visforms.
Kind regards.