Forums

How to translate radio button group value for use it in the email

serguei_kp 08 Mar, 2019
Hello,
My question is:
How to translate the value of the radio button group in order to put it in the email OR how to put in the email a radio button translated label ?
I know how to translate the label, but how to translate the value?

I have this options in my radio group with name "service_type"
value1={l:transfer}
value2={l:dispo_bus}

In Loop I retrieve the value with this: {var:loop_all_fields.row.service_type}
but Loop gives me only value which is not translated and I need to localize the value.

Regards.
serguei_kp 08 Mar, 2019
I have to notice that my radio button group is inside a Repeater area.
healyhatman 08 Mar, 2019
If it's a loop event you're using to build your text you can put a Switch in, data source {var:loop_all_fields.row.service_type}
serguei_kp 09 Mar, 2019
Hi, in order to retrieve data for email I use just Loop, not Loop event, it is going after a Loop Event that I use to save data into database, is there a difference
for me to use Loop or Loop event?
What is the exact position of Switch?

Loop:
{data:Modelservices}
Name:
loop_all_fields
Loop body:
{var:loop_all_fields.row.service_type}

Best regards.
serguei_kp 19 Apr, 2019
Answer
[div wfd-id="67"]Hi, I've resolved how to translate radio group Options values, here is the example:[div wfd-id="118"]Opions in the Radio group: [div wfd-id="117"]transfer={l:transfer}
bus_hourly_hire={l:dispo_bus}[div wfd-id="116"]​[div wfd-id="115"]Create in the Loop event body switch# and custom code:[div wfd-id="115"]Loop event Name: loop_event42
Return the resalt as var: yes
​[div wfd-id="115"]In body at the bottom create a Switch :loop_event42[div wfd-id="114"]Name: switch44[div wfd-id="113"]Data provider: {var:loop_event42.row.service_type}[div wfd-id="112"]Values setup: [div wfd-id="111"]transfer:{l:transfer}
bus_hourly_hire:{l:dispo_bus}[div wfd-id="110"]Return the resalt as var: yes
​[div wfd-id="109"]Custom code:[div wfd-id="108"]Content: [div wfd-id="107"]{var:loop_event42.row.service_date}
{var:switch44}
Var only result?: no

Email
Body:
{var:loop_event42}[div wfd-id="106"]​[div wfd-id="105"]That is all, now radio group value will have the same value as the translated label of the value.
This topic is locked and no more replies can be posted.