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

  • NickPovey
  • Topic Author
  • Away
More
1 week 1 day ago - 1 week 1 day 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 1 day ago by NickPovey.

More
1 week 6 hours 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 :-).

  • NickPovey
  • Topic Author
  • Away
More
8 minutes ago - 3 minutes 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 that might give a solution is if we could use the ID field with a correction to generate a value for "Tally" such that the first Tally entry for a sailing event could be calculated to be 1, regardless of the actual ID for that form at the time. I'm not sure if this is possible or how it might be achieved. Thank you Nick

 
Last edit: 3 minutes ago by NickPovey.

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum