Radio buttons: display Title instead of value on multi page

pat01 20 Feb, 2019
Hello

In a CF5 form I use following code to display the value of a field on a multi page form:

$form->data['city'];

Where fom field 'city' are radio buttons:

City1=London
City2=Berlin
City3=Paris


The code above displays the value of the selected radio button.
How can I display the Title instead of the value? So on the multi page for example "Berlin" ist displayed instead of "City2"?

Thanks a lot!

Patrick
healyhatman 20 Feb, 2019
Answer
1 Likes
switch($form->data['city']) {
case "City1":
echo "London";
break;
case "City2":
..........
}
pat01 21 Feb, 2019
Works fine, thanks!
jeannivev 26 Jul, 2019
Hello. is it working on the CV6 I tried to add switch with the code in the event submit but it is not owrking
GreyHead 29 Jul, 2019
Hi jeannivev ,

I believe that CFv6 uses $this->data in place of $form->data - does that help?

Bob
This topic is locked and no more replies can be posted.