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.

value of selection type not returned

Mehr
6 Jahre 9 Monate her #4598 von cverger
value of selection type not returned wurde erstellt von cverger
On the result page I want to see data types in the form by the user. For example, If I have item Name and email, with the types text and email,it workds. I just put visformfield [name]

Mehr
6 Jahre 9 Monate her #4600 von Administrator AV
Administrator AV antwortete auf value of selection type not returned
Hi,

fields of type select, radio and checkboxgroup have options which consist of a label and a value each. If user inputs for this fields are stored in the data base, the selected value is stored. If user inputs for this fields are used somewhere inside Visforms (in a calculation, in conditional fields, as ulr parameters in a redirect url....) always the selected value is used or passed.

But if user inputs for those fields are displayed for the user to see (data view, emails, result message) the label of the selected option is displayed, because this is what the user see when they make the selection and there is, what they expect to see. This allows you to use different "strings" for the label and the value and consistantly display/use the expected one.

There is no way to change this behavior. So the only solution would be to use the same "string" as label and value.

Regards,
Aicha

: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
6 Jahre 9 Monate her #4601 von cverger
cverger antwortete auf value of selection type not returned
Thank you for your reply, but unfortunately it did not solve my problem. May be I will explain more in detail : I want in the select type fleld that the visitor select the short name of powerpoint file and that he gets in the reply page the URL to download this file. So I put the name in the label and the URL in the value (which is not seen at first by the visitor). Of course if I put the URL as label it works but it makes the label poorly understandable. I set up a reply mail with the content of the form and this is a solution as it works with it but the problem is the reply mail can be blocked by antispam, so I would prefer the value returned in a page. I hope I am clear.
Many thankd in advance if you can help me.
Christian

Mehr
6 Jahre 9 Monate her #4602 von Administrator AV
Administrator AV antwortete auf value of selection type not returned
Hi,

the only solution I can see at the moment would be a modification in a Visforms Core file.

I think that if you make the following modifications to the file administrator\components\com_visforms\helpers\html\visforms.php this would work but I have not tested (Please make a backup copy of the original file first in case the modification does not work.) and you will loose these changes with any Visforms update (and have to add them manually after the update again.)

In the public static function replacePlaceholder($form, &$text = '') you find the following code at about line 729
Code:
if (in_array($fieldtype, array("multicheckbox", "select", "radio"))) { $fieldValue = implode(', ', JHtmlVisformsselect::mapDbValueToOptionLabel($fieldValue, $ffield->list_hidden)); }

replace it with
Code:
if (in_array($fieldtype, array("multicheckbox", "select", "radio"))) { $fieldValue = JHtmlVisformsselect::removeNullbyte($ffield->dbValue); }

Regards,
Aicha

: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
6 Jahre 9 Monate her #4604 von cverger
cverger antwortete auf value of selection type not returned
Thank you thousand of times : your reply was fast and your solution works perfectly.

Mehr
6 Jahre 9 Monate her #4605 von Administrator AV
Administrator AV antwortete auf value of selection type not returned
Hi,

I'll make it a feature in Visforms.

I'll add a new configuration parameter to the fields of type select, radio and multi checkbox, which will allow you to choose, if placeholders of the field (as the can be used in the email texts and the form result message text) are replaced with the option label (which is the default, because that is the way it is done now) or with the option value. T

his feature will be released with the next Visforms version. So if you update Visforms, then, you just have to set this field configuration option instead of changing the code in the Visforms core file again.

Regards,
Aicha

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

Moderatoren: Administrator AVAdministrator IV
Powered by Kunena Forum