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.

conditional drop down feature

More
4 years 6 months ago #6347 by umif
Replied by umif on topic conditional drop down feature

Administrator wrote: Hi

then you have to add different field for City 1, 2 ,3 and City 4,5,6 and make the field for the cities 1, 2,3 conditional to country selection A and the field for the cities 3,5,6 conditional for the country b.

Regards,
Aicha


Dear Aicha,
I would like to catch up on that. I have a similar problem, however, this proposed solution will provide several output columns in the database, i.e. for every Country its own City field (which can become a huge number). Is it somehow possible to create output in a way that there will be only 1 Country and 1 City column but keeping the conditional selection?
Thanks,
Bernd

More
4 years 6 months ago #6349 by Administrator AV
Replied by Administrator AV on topic conditional drop down feature
Hi Bernd,
with the visForms Subscription 3.4.x, which is currently released as a beta version, we have introduce listboxes, where the option list is created with an sql statement using data stored in the database. With this feature you can solve your problem. see:
www.vi-solutions.de/de/support/dokumenta...r-mit-optionenlisten
Basically you have to create a table in your database that contains the information about countries and cities in a sensible way
You can even use visForms and create a different form to get the information into the database.
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 6 months ago #6351 by umif
Replied by umif on topic conditional drop down feature
Dear Aicha,

thanks for the reply!
I installed the beta version but there is no additional fields available such as selectsql. Also I am not sure if the field Options in the beta should look like that (e.g. one cannot type anything in the "SQL-select-Statement" Option, no text line visible; also several "required" checkboxes selectable). Please the snapshot below. Is that all correct?


Best,
Bernd

More
4 years 6 months ago #6352 by Administrator AV
Replied by Administrator AV on topic conditional drop down feature
Hi Bernd,

no, it should not look like this. Probably, there an old javascript file cached in your browser.

And you did update both. visForms to 3.13.6 and the Subscription to 3.4.4, did you?

The field type is selectsql and it is near the bottom of the "type" drowdown list.

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 6 months ago #6353 by umif
Replied by umif on topic conditional drop down feature
Thanks!
I got it working to the point that the option list changes dynamically upon selection from a previous field (similar to what you wrote for the example "Holiday Region" and "Hotel"). However, the "Hotel" field does not dynamically update although the option is set to "Make reloadable = yes" and "Reload Options on Change of = "Holiday region" field are selected.
What could be wrong?

More
4 years 6 months ago #6354 by Administrator AV
Replied by Administrator AV on topic conditional drop down feature
Hi,
that is good news so far.

I think, that the reloading is working, but in order to actually see different options in your option list, you have to use the selected value from the "Holiday Region"-field inside the sql statement of the "Hotel"-sql, in order to find those Hotels which belong to a specific region.

This is done with an sql where statement and placeholder, which you have to your select-sql statement.

As the "Holiday Region" itself is a field of type select (or selectsql), you have to use following syntax
Code:
where dbfieldname in ${input:holidayregionfieldname[]}

where the "dbfieldname" is the name of the "Hotel Region" field in the "Hotels" table in the database and "holidayrefionfieldname" is the field name of the "Hotel Region" form field (which is the value of the name option in the field configuration).

If this where statement is incorrect (using the wrong place holder or the wrong syntax or the wrong dbfieldname) it will simply return zero options.

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