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.

Using SQL Statement with Text Field

Mehr
1 Jahr 11 Monate her #8807 von solv4ex
Using SQL Statement with Text Field wurde erstellt von solv4ex
I've been trying to get the Text field type to work with pulling it's initial value from the database using a sql statement.  The statement works fine if I use a field type of SQL Select, but won't populate with any value no matter what variations I try in the statement.  The table only has a single value for the query. 
I've tried SELECT comp_price_am2_mu FROM v_dec_select WHERE comp_id = ${input:comp-model} and SELECT comp_price_am2_mu as value FROM v_dec_select WHERE comp_id = ${input:comp-model}
Fill Field with is selected to Custom default value from SQL-Statement.

I need this to work, as I need to allow the users to accept the default or to set their own value if they prefer.
Thanks
Nikita
 

Mehr
1 Jahr 11 Monate her #8816 von Administrator IV
Administrator IV antwortete auf Using SQL Statement with Text Field
Hello Nikita,

for setting default values via an SQL statement, no placeholders can be used for other form fields.
The default value is set before the form is displayed for the first time.
Other field values are not available at this early stage.

The field to which the placeholder in the SQL statement refers is only filled with a start value when the form is first displayed.
So you can simply enter the fixed starting value of the other field directly into the SQL statement:
Code:
SELECT comp_price_am2_mu FROM v_dec_select WHERE comp_id = 333;

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

Mehr
1 Jahr 11 Monate her #8817 von solv4ex
solv4ex antwortete auf Using SQL Statement with Text Field
Thank you for the reply. So effectively a pretty useless feature, if you can't tie parameters to other fields values.

I'll just have to customize and use some ajax to get it to work like we require.

Thanks again

Mehr
1 Jahr 11 Monate her - 1 Jahr 11 Monate her #8824 von Administrator IV
Administrator IV antwortete auf Using SQL Statement with Text Field
Hello solvex,

I think you are confusing the tools here.

The 'Default value' feature with all the options for setting it, including the option of setting a free SQL statement, is very popular.
It is purely the start value and not the dynamic value depending on the current user input in the form.

Another way to set the default value is 'Default values as URL parameters':
docs.joomla-4.visforms.vi-solutions.de/e...ue-as-url-parameter/

The numerous options for setting the default value are more than exhausted.

What you need, however, is the feature 'SQL fields with option lists':
docs.joomla-4.visforms.vi-solutions.de/e...ds-with-option-list/

This is currently only available for fields with option lists.

I have already created an issue for this based on other forum posts and added it to the development list:
Issue [VF-435] Forum: SQL-Fields: Add two new field types SQL-text and SQL-texarea
After a future release that contains this point, you will now also be informed about it directly here in the topic.

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 11 Monate her von Administrator IV.

Moderatoren: Administrator AVAdministrator IV
Powered by Kunena Forum