Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

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?

Feld mit SQL-Select-Statement

More
3 weeks 2 days ago - 3 weeks 2 days ago #11546 by PFS_hansi
Feld mit SQL-Select-Statement was created by PFS_hansi
Ich habe in meinem Formular 2 Felder, die ich abfragen möchte um die Anzahl zur weiteren Berechnung verwenden zu können.

Feld "F1" ListBox (name: f1)
Feld "F2" Radiobutton  (name: f1)
Feld "F3" ... "F5" Text  (name: f3..f5)
Feld "F6": "Listbox SQL" (name: f6)

Wenn ich nun eine Änderung im Feld F3 mache möchte ich in F6 die Anzahl der bereits eingegeben Daten mit Filter F1 anzeigen.
Abfrage auf ListBox: SELECT COUNT(F1) as value, 'Anzahl' AS label FROM #_visforms_1 WHERE F1 IN ${input:f1}; --> das funktioniert auch.
Abfrage auf Radiobutton: SELECT COUNT(F2) as value, 'Anzahl' AS label FROM #_visforms_1 WHERE F2 IN ${input:f2}; --> das funktioniert leider NICHT.

wie kann ich die Abfrage auf einen Radiobutton machen?
habe es auch mi t ...WHERE F2 = ${input:f2} probiert.

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


danke
Hansi
Last edit: 3 weeks 2 days ago by PFS_hansi.

More
3 weeks 1 day ago #11550 by Administrator IV
Replied by Administrator IV on topic Feld mit SQL-Select-Statement
Hallo Hansi,

danke für die Versions-Informationen.

Zu: WHERE F2 IN ${input:f2}.

Nur Formularfelder vom Typ Listbox und Checkbox Gruppe übergeben die Benutzereingaben im POST-Request als ein Array.
Radio-Buttons haben als Ergebnis einen einfachen Text.

Platzhalter für Listen-Felder, die als Array übergeben werden:
docs.joomla-5.visforms.vi-solutions.de/d...C3%BCbergeben-werden

Zu:  auch mit WHERE F2 = ${input:f2} probiert.

Das Ergebnis der Platzhalter-Ersetzung ist ein Text.
Der Text muss für den Text-Vergleich im SQL-Statement als Text formatiert werden:
Code:
WHERE F2 = '${input:f2}'

In den Erklärungen der Dokumentation steht dazu bislang weder ein Hinweis darauf noch ein kleines Beispiel.

Wir sehen das als einen Mangel der Visforms Dokumentation an und werden diese um deinen Punkt entsprechend erweitern.
Ich habe dazu einen Issue zur Erweiterung der Dokumentation angelegt:
Issue [VF-1468] Forum: Docu: SQL Field: Parameter Replacement: Add hint and small example for WHERE clause with string comparison

Wenn wir die Dokumentation erweitert haben, wirst du explizit darüber hier im Thema informiert.
Vielen Dank nochmal für deinen Beitrag!

Liebe Grüße, 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 :-).
The following user(s) said Thank You: PFS_hansi

More
3 weeks 1 day ago #11551 by PFS_hansi
Replied by PFS_hansi on topic Feld mit SQL-Select-Statement
Hallo Ingmar!

Danke für die Rückmeldung.Der angegebene Ausdruck WHERE F2 = '${input:f2}' funktioniert.

danke
Hansi
The following user(s) said Thank You: Administrator IV

More
3 weeks 21 hours ago #11554 by Administrator IV
Replied by Administrator IV on topic Feld mit SQL-Select-Statement
Hallo Hansi,

das freut mich selbstverständlich.

Dir ebenfalls Danke für deine Rückmeldung.

Liebe Grüße, 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 :-).

More
3 weeks 18 hours ago #11556 by Administrator IV
Replied by Administrator IV on topic Feld mit SQL-Select-Statement
Hallo Hansi,

Zu: Issue [VF-1468] Forum: Docu: SQL Field: Parameter Replacement: Add a hint and small example for WHERE clause with string comparison

Die Dokumentation wurde dementsprechend um folgenden Abschnitt erweitert.
Platzhalter im SQL nutzen:
docs.joomla-5.visforms.vi-solutions.de/d...halter-im-sql-nutzen

Unter Umständen wird noch eine alte Seite angezeigt, was am Zwischenspeichern von Seiten durch den Web-Browser liegt.
Die Anzeige des neuen Textes mit Leerung des Browser Caches erfolgt mit folgender Tastenkombination:
Strg + Umschaltung + R.

Liebe Grüße, 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 :-).

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum