Closed sqwk closed 1 day ago
Hi,
I don't understand the issue. What field type are you using?
For simple checkbox options should not be used, because it is simple value.
For checkbox list you can use options and then field.value
will display checked options like so:
Checkbox list: Option 1, Option 2
You can export your form and attach it for testing.
This is about a normal checkbox, which inherently has value 1
:
<input id="field_name" name="field_name" class=" form-check-input" value="1" type="checkbox">
In the backend (Form Logs > Form Data tab) this gets translated to Yes
or No
. In Emails that are sent out it is listed as 0
or 1
. Can this 0
or 1
also be translated or customised?
Hmm, in the latest version I have also translated value to "Yes" and "No".
Language strings can be override with October.
https://docs.octobercms.com/3.x/extend/system/localization.html#overriding-localization-strings
In renatio/formbuilder/lang/en/lang.php file there is translation:
'checkbox' => [
'true' => 'Yes',
'false' => 'No',
],
Is it possible to override these on a per checkbox basis? Or would this need to be done in the email template?
At the moment checkboxes have the value
1
. When sending an email this is displayed as label: 1.Can we use the options array instead to override the displayed text?
Alternatively, is something like this possible?
For that getDate would also need to supply
options
andtype
.Note that something like the following does not work inside an email template:
Do email templates only support a subset of twig tags?