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?

Make sure hidden field is populated / check contents

More
2 days 22 hours ago #11710 by jonas21
Hello,

i have a hidden field in a form that is populated by querying sql data. This works fine, however in rare cases (about 1 of 50-60 form submissions) the field is empty, which should not be possible since the data is in the sql table. I have no idea what causes this, i recently changed from apache to nginx but this didnt help. I assume the problem is either php or the browser of the clients but unsure about that. I meanwhile have enable the sql query log to see if it does indeed do the query and just fails to fill in the form.
However i wonder if there is a way to make sure that the sql query from the hidden field is always non-empty. I dont see an easy way for that as most of the options (javascript etc) are not possible for hidden fields.
 

More
2 days 19 hours ago #11711 by Administrator AV
Replied by Administrator AV on topic Make sure hidden field is populated / check contents
Hi Jonas 21,

do you use Default Value Settings >> Custom Default Value from SQL Statement

or

'Dynamic Settings' >> SQL-Field for the querying SQL data?

Regard,
Aicha

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

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

More
2 days 18 hours ago #11712 by jonas21
Sorry, using dynamic settings -> sql field.
 

More
1 day 20 hours ago #11714 by Administrator AV
Replied by Administrator AV on topic Make sure hidden field is populated / check contents
Hi,

thanks for the additional information.

I assume, that your sql Statement always returns a not empty value.

We consider the behavior, which you have described a bug in Visforms and will adjust the behavior.
I created a development issue in the bug list:
Issue [VF-1530]: Make sure value from sql is always populated properly in hidden field

When we release the bug fix, you will be explicitly informed about the release here in the topic.
There may also be a file-based hot fix for this bug in the very short term.
Thank you again for your report!

As a Background information:
I took a look into the code.
Currently the php validation only checks the user input of a hidden field, if  the value is not empty.
With other field types, there is the addional option 'Required Field' which takes care of the case, when the value is empty.
As you have pointed out correctly, this option is not available in hidden fields.
So sadly, there is build in way to fix the problem for hidden fields.

Regards,
Aicha

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

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

More
1 day 11 hours ago #11715 by jonas21
Yes, the SQL field should never be empty, it will always return something.

Thanks for the quick action. Looking forward for a new/fixed release then.

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum