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?

Update a field value on form submission

More
1 week 4 days ago - 1 week 4 days ago #12502 by NickPovey
Update a field value on form submission was created by NickPovey
Visforms 5.6.3
Joomla 5.4.8
PHP 8.4.24

I have a field "Tally Number" which is currently generated via a SQL query and incremented by one for each time a completed form is submitted. Thus generating a unique sequential number for each form submission starting at 1. All works well until multiple forms are simultaneously opened by different users. This is because the tally number is calculated when the form is opened, but only incremented when the form is submitted. Thus forms opened at the same time get the same Tally Number. Not being a programmer my question is two fold. Can a field be made to calculate only on submission? Or, maybe there is a better way to achieve what I need?
And just for the record VisForms has been simply fantastic for us over many years now in helping us to run our annual sailing event.
Thank you. Nick
Last edit: 1 week 4 days ago by NickPovey.

More
1 week 4 days ago #12506 by Administrator AV
Replied by Administrator AV on topic Update a field value on form submission
Hi Nick,

We are happy to hear, that Visforms works fantastically for your!

There is a field configuration option 'Unique Values Only'.
Field Configuration >> Baisc Settings >> Validation Settings

This option enforce that within records submitted for a form, each user input in this field is unique.
The validation is performed on the server site, directly when the record is stored in the data base.
If there already exists a record with the same value, the form will be redisplayed to the user who came second.

This feature prevents dublicate tally numbers.
You might want to add a usefull php validation error message.
Field Configuration >> General Settings >>'Help-text and Error Messages >> Custom error message (php)

Kind Regards and good luck with your sailing event,
Aicha
 

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

More
3 days 20 hours ago - 3 days 19 hours ago #12527 by NickPovey
Replied by NickPovey on topic Update a field value on form submission
Aicha, thank you for your reply. I've given your suggestion some testing and unfortunately for us it isn't going to work. The "Tally" field isn't displayed to the user and we don't want it to be editable. And it doesn't automatically update on re-submission. I think that the only approach is to generate a value for "Tally" at the time of writing the data to the table. I'm not sure if this is possible or how it might be achieved. Thankfully the number of duplicates is only a handful per event so making corrections isn't too onerous. Thank you Nick

 
Last edit: 3 days 19 hours ago by NickPovey.

More
1 day 2 hours ago #12531 by Administrator AV
Replied by Administrator AV on topic Update a field value on form submission
Hi Nick,

I have created a development issue in the feature wish list:
Issue [VF- 1822]: Expand Feature ‘Unique Values Only’ to Field Type ‘hidden’ 

When we release the new feature, you will be explicitly informed about the release here in the topic.
Thank you for your suggestion!

Kind Regards,
Aicha

: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