Joomla 5 Mitteilung

Wir freuen uns mitteilen zu können, dass seit dem 29. Januar 2024 alle unsere Joomla Erweiterungen mit Joomla 5 kompatible sind.

Für alle die gerade noch von Joomla 3 auf 4 aktualisieren: Anleitungen für die Joomla 4 Migration gibt es hier:

Es gibt nun auch eine eigenständige Dokumentation für Visforms für Joomla 4 und für Visforms auf Joomla 5

Forum

Visforms Subscription Inhaber können in unserem Forum Fragen stellen. Bitte mit dem entsprechenden Benutzer anmelden.
Jeder kann lesend auf das Forum zugreifen.

Bitte stellen Sie nur 1 Frage pro Thema.

Wichtig Angaben für fast jede Frage:
V1: Welche Visforms-Version läuft?
V2: Welche Joomla-Version läuft?
V3: Welche PHP-Version läuft?

Aufgrund von Feiertagen und Urlaub ist bei Anfragen im Forum in der Zeit vom 20. Dezember 2024 bis zum 8.Januar 2025 mit verlängerten Antwortzeiten zu rechnen.

Auto Increment Field

Mehr
1 Jahr 8 Monate her #9102 von NickPovey
Auto Increment Field wurde erstellt von NickPovey
Could you point me at the information or make a suggestion how I might achieve the following. For the entrants for each sailing event we run, the competitors are issued with a unique tally band number and a corresponding tally band that they take when sailing (a safety system that lets us know if they might still be on the water). I would like a field that auto increments from 1 for each entrant to an event (i.e. we can reset it easily) that I can use to create some text in the receipt email. e.g " Your tally band number is XX." I suspect I could use the Id but I'm unsure how to reset that back to zero, or how to add text to that field. I'm still loving Visforms!  I've spent the last few days moving to Joomla 4 and new site templates in the hope that things can remain stable for a few years! Thank you, Nick

Mehr
1 Jahr 8 Monate her - 1 Jahr 8 Monate her #9103 von Administrator IV
Administrator IV antwortete auf Auto Increment Field
Hello Nick,

you can get the solution using a field of type 'Listbox Sql'.
In the SQL statement you can individually specify the start of the counter, static text and the counting method yourself.

The documentation describes the SQL-based fields.
SQL fields with option lists:
docs.joomla-4.visforms.vi-solutions.de/e...ds-with-option-list/

There is a forum topic that answers something very similar (unfortunately in German):
vi-solutions.de/de/support/forum/19-joom...g-eindeutige-id#8113

Examples of the 'SQL-Select-Statement' parameter on the 'Basic Options' tab of the field configuration of a 'Listbox Sql' type field would be something like the following.

Ascending number (1, 2, 3, ...):
Code:
select max(id) as value, max(id) as label from #__visforms_2 as label

A text plus an ascending number (A-10035, A-10036, ...):
Code:
select concat('A-', (select max(id) + 10000 from jx_visforms_2)) as value, concat('A-', (select max(id) + 10000 from #__visforms_2)) as label

The value in the field would then be with a largest data ID (without deleting = number of data records) of 35 in the data for the form, for example: 'A-10035'
The value increments by 1 for each new record.

You can also use an explanatory text as a label: Your unique tally band number

Explanation of the table name '#__visforms_2':
'#__' = placeholder for the concrete Joomla table name prefix
'2' = Form ID

The following parameters must also be set in the field configuration, 'Basic Options' tab:
'Preselect solitary option' = 'Yes'
'Reload on change of' = at least 1 field (list box, radio or check box)
'Hide when preselected' = 'Yes' or 'No' (if 'yes' the field is not visible in the form).

This parameter is also important in the field configuration, tab 'Advanced':
'Enforce unique values' = 'Yes'.

If another user has submitted the same form in the meantime, an error message appears and the form simply has to be submitted again unchanged.
However, the current value for the 'Listbox Sql' field has already changed/incremented/adjusted automatically.

It would still be important to inform the user about it by means of a suitable text in a suitable place.
It should be clear to him that he simply needs to submit the form again.

Kind regards, Ingmar

: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 :-).
Letzte Änderung: 1 Jahr 8 Monate her von Administrator IV.

Mehr
1 Jahr 8 Monate her #9104 von NickPovey
NickPovey antwortete auf Auto Increment Field
Wow!
Ingmar, I couldn't ask for better support!. Thank you

Mehr
1 Jahr 8 Monate her #9107 von NickPovey
NickPovey antwortete auf Auto Increment Field
I got home late and tried the above, all makes sense so thank you for that. But - I'm getting "Sorry, the request could not be performed due to a invalid Session Token" on the form field SQL test and nothing appears in the form saved results. Possibly caching or Joomla security plugin not enabled? I'll sleep on it tonight. Thank you.

Nick

Mehr
1 Jahr 8 Monate her #9108 von NickPovey
NickPovey antwortete auf Auto Increment Field
I deleted the field I was working on and started afresh, All works fine now! Not sure what the root cause was....

Mehr
1 Jahr 8 Monate her - 1 Jahr 8 Monate her #9109 von NickPovey
NickPovey antwortete auf Auto Increment Field
Everything working nicely and I am now making discoveries about the power of the customised PDF attachments - brilliant!
Letzte Änderung: 1 Jahr 8 Monate her von NickPovey.

Moderatoren: Administrator AVAdministrator IV
Powered by Kunena Forum