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.

Important information for almost every question:
V1: Which Visforms version is running?
V2: Which Joomla version is running?
V3: Which PHP version is running?

Placeholders in SQL statements for field types (selectsql, radiosql)

More
4 years 2 months ago #7058 by pcuette
Hi
I'm trying to use field types (selectsql or radiosql) in a form to get option list extracted form à database table, but it does not work.
Here is my test :
- input field : Identifiant (alias identifiant)
- field select (SQL select statement)
select f_label as label,f_value as value from #__adherent where f_label = '${input:identifiant}'

When I input a string in field 'Identifiant', nothing displays for the select field when the condition is true

Can you help me ?

Regards
Philippe

More
4 years 2 months ago #7059 by Administrator AV
Hi Philippe,

I think, that there is actually a misunderstanding about the concept of what the input object is.

The input object is gathered from the request (GET and POST).

So identifiant must either be set as URL-Parameter in the URL which displays the form in the first place.

Or you must use the Select SQL field option "Make reloadable" and choose the identifiant field then in the option "Reload on change of". This will trigger, that a AJAX request with the current user inputs is send to the server.

Please note, that only fields of type select, radio, checkboxgroup, chekbox, selectsql radiosql and Checkboxgroup SQL can be used as reload trigger fields.

If the relaod trigger field is a select, selectsql, checkboxgroup or checkboxgroup sql field you also need to change the syntax from
'${input:identifiant}'
to
in ${input:identifiant[]}
(without quotes)

Regards,
Aicha

: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
4 years 2 months ago #7060 by pcuette
Hi Aicha
Thank you for your answer. But is it possible to have an small example ?
I can't find any in your documentation.
Regards.
Philippe

More
4 years 2 months ago #7065 by Administrator AV
Hi,

if you want to use an URL-Parameter in order to set a default value in the identifiant field, please check out the documentation about URL-Parameters: www.vi-solutions.de/en/documentations/vi...lue-using-url-params

If you want to use the "Make reloadable" feature, and the field identifiant is of type select, then your sql statement would be
select f_label as label,f_value as value from #__adherent where f_label in ${input:identifiant[]}
Regards,
Aicha

: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 :-).

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum