Joomla 6 Mitteilung

Wir freuen uns mitteilen zu können, dass seit dem 14. Oktober 2025 alle unsere Joomla Erweiterungen mit Joomla 6 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 eigenständige Dokumentationen Visforms Joomla 4, Visforms Joomla 5 und Visforms Joomla 6.

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.

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

Populate Field with Info Related to User Group

Mehr
3 Tage 9 Stunden her #12298 von herb200mph
Populate Field with Info Related to User Group wurde erstellt von herb200mph
Our client would like a data field automatically populated when a user from a specific group logs in.

An example would be:

A JOOMLA6 User Group has only ACCOUNTANTS allowed access with a common user name and password.
When logged in, it opens a form, the first field of the form pulls the name of the specific user group for ACCOUNTANTS.

Another group might be BOOKKEEPERS and when they login with their unique user name and password, the first line of the form would display BOOKKEEPERS.

Can anyone guide us, or give us the code needed to pull this off in Visforms?

Thank you in advance for any assistant provided.


 

Mehr
18 Stunden 7 Minuten her #12299 von Administrator IV
Administrator IV antwortete auf Populate Field with Info Related to User Group
Greetings herb200mph,

Re: a data field automatically populated when a user from a specific group logs in

One possible solution is to use custom SQL.
You could use a text field with an SQL configuration—specifically within either the 'Default Value Settings' or 'Dynamic Settings' section.
You can find these settings in the field configuration under the 'Basic Settings' tab.

This solution allows you to implement many of the details you have in mind—even those not explicitly mentioned here—ensuring the final result works exactly as you envision.

The solution involves using Visforms placeholders within SQL statements in the field configuration (e.g., for a text field).
Visforms placeholders:
docs.joomla-6.visforms.vi-solutions.de/e...isforms-placeholder/
SQL fields (text type):
docs.joomla-6.visforms.vi-solutions.de/e...s-text-typed-fields/
Examples of forms with SQL fields:
docs.joomla-6.visforms.vi-solutions.de/e...-types/sql/examples/

Regarding the necessary Visforms placeholder:
In your case, you would use the placeholder for the logged-in user's ID within the SQL statement.
Your SQL statement would use the user ID to retrieve the name of an expected or specific user group by querying the relevant Joomla tables.
The SQL logic of your statement then determines the value that appears in the text field—or whether anything appears at all.
Joomla User object:
docs.joomla-6.visforms.vi-solutions.de/e.../#joomla-user-object

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

Moderatoren: Administrator AVAdministrator IV
Powered by Kunena Forum