Joomla 6 Notice

We are pleased to announce that all our Joomla extensions have been compatible with Joomla 6 since October 14th, 2025.

For those currently upgrading from Joomla 3 to 4: Instructions for Joomla 4 migration can be found here:

There are standalone documentations Visforms Joomla 4, Visforms Joomla 5 and Visforms Joomla 6.

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?

Some issue with selectsql type of field

More
2 years 10 months ago #9372 by liaskas
Hello
in a form i have created in the past (and was working like a charm), now i have the following problem...

I use a field of type selectsql.

This field gets some values fro the database and lists them to the user that fill the form to select.
The SQL statement used is...
SELECT DISTINCT a.username AS label, a.id, b.fromuser, b.touser AS value FROM #__users a left join #__jchat b on b.fromuser = a.id WHERE b.touser='${user:id}' ORDER BY label ASC;

and it gives no errors. Right now test says "success: found 4 entries"

At the front end i see correctly the 4 different values.

Now when i select one of the values of the selectsql field, i always get "Please select no more than 1 option(s) for field xxx" when submitting the form.

Can you please advise how to solve this problem?

More
2 years 10 months ago #9374 by Administrator IV
Replied by Administrator IV on topic Some issue with selectsql type of field
Hello liaskas,

my advice for fixing the incorrectly filled form is to make sure the sql listbox has all option values unique.

I suspect that it is not due to the Visforms field configuration.
I also suspect that your SQL statement produces, at least in part, identical values in the options values.
So it's up to the data or the SQL statement.

Here is a small example.
The error occurs when you select the ''label-1-a' or ''label-1-a' options.
The error does not occur when you select the ''label-3' or ''label-4' options.

select 'label-1-a' as label, 'value-1' as value
union select 'label-1-b' as label, 'value-1' as value
union select 'label-3' as label, 'value-3' as value
union select 'label-4' as label, 'value-4' as value;

Kind regards, Ingmar

:idea: I recommend you the new and up-to-date documentation for Joomla 6:
docs.joomla-6.visforms.vi-solutions.de/en/docs/
Please ask only 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation fĂĽr Joomla 6:
docs.joomla-6.visforms.vi-solutions.de/docs/
Bitte immer nur 1 Frage pro Thema stellen :-).

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum