Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Pre-Populate field with url value

More
1 year 7 months ago #8371 by jhudson_jvh
Pre-Populate field with url value was created by jhudson_jvh
Can you provide an example of the URL formating to prepopulate a filed with the variable inside URL? I am not able to get this to work. The variable shows in the URL, but it doesn't populate the form even after setting the Allow URL Parameter to yes. Not sure what I am missing.  Can you assist? Ideally, I want to use this in a dynamic dropdown SQL query for another field.

More
1 year 7 months ago - 1 year 7 months ago #8376 by Administrator IV
Replied by Administrator IV on topic Pre-Populate field with url value
Hello jhudson_jvh,

the documentation describes the use of URL parameters to set a default value quite extensively:

docs.joomla-4.visforms.vi-solutions.de/e...ue-as-url-parameter/

Let me know if you don't get along with this description either.
In this case it would be nice if you could describe your use case a little more precisely.

Best regards, Ingmar

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).
Last edit: 1 year 7 months ago by Administrator IV.

More
1 year 7 months ago #8377 by Administrator IV
Replied by Administrator IV on topic Pre-Populate field with url value
Hello jhudson_jvh,

The URL parameter for a form field can only contain fixed values.

For the plugin 'Content Plugin - Visforms form', placeholders for various other information can also be set for the plugin string:
docs.joomla-4.visforms.vi-solutions.de/e...#page-url-as-default -value

The placeholders that are possible for the plugin string above cannot be set in the URL parameter for a form field.
For a form field, these values can only be selected in the field configuration:
docs.joomla-4.visforms.vi-solutions.de/e...dividual-field-types

Best regards, Ingmar

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
1 year 7 months ago #8387 by jhudson_jvh
Replied by jhudson_jvh on topic Pre-Populate field with url value
Apologies for not responding earlier. I am able to place variables in the URL in the form without any issues. The challenge I am having is when I try to use this variable in a new form and set it as the default value as input for a subsequent SQL.For example URL = index.php/quotation-results?formidno=6323e699ce6509.90819428

Where formidno is what I would like to use in a custom default value from SQL in this new form, is this possible with this module?

More
1 year 7 months ago - 1 year 7 months ago #8398 by Administrator IV
Replied by Administrator IV on topic Pre-Populate field with url value
Hello jhudson_jvh,

I am truly sorry for my late reply!
I built an example form that behaves like I think you like to have it.

Example:

Form name = 'calculation-form'
Form ID = 11

The default value of field 'number2' is set via the URL parameter.
The default value of field 'number3' is set via an SQL statement that uses the URL parameter for field 'number2' (in the most simple way).

The local test calling URL is: localhost/developj4/index.php/calculation-form?form11number2=2345

The form called by this URL shows like this:
vi-solutions.de/forum-uploads/pre-popula...h-url-value_form.png

The field configuration part of field 'number3' is:
vi-solutions.de/forum-uploads/pre-popula...ld-configuration.png

Explanation:

You can use values from the Joomla user object, the current Joomla user, or values from the current Joomla input object.
More on this in: docs.joomla-4.visforms.vi-solutions.de/e...field-default-value/

The URL parameter for field 'number2' is part of the Joomla input object.

The parameter has the name 'form11number2' in the Joomla input object.
More on this in: docs.joomla-4.visforms.vi-solutions.de/e...#the-parameter-value

I hope this answers your question!

Best regards, Ingmar

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).
Last edit: 1 year 7 months ago by Administrator IV.

More
1 year 7 months ago #8414 by jhudson_jvh
Replied by jhudson_jvh on topic Pre-Populate field with url value
Thanks for taking the time to explain and provide details. This looks like it can work. I will try it and if I have any challenges I will reach out. Thanks again.

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum