Hi,
In a first page I have a form with a checkbox group, his field name is 'color[]' and there are three options: blue, red, green.
In a second page there is a custom code with {color}
My output is: array ( 0 => 'blue', 1 => 'green', )
Instead I would have as output simply blue,green
How can i do?
In a first page I have a form with a checkbox group, his field name is 'color[]' and there are three options: blue, red, green.
In a second page there is a custom code with {color}
My output is: array ( 0 => 'blue', 1 => 'green', )
Instead I would have as output simply blue,green
How can i do?
Hello armandocurcio,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I have a 'select all' option in a checkbox group?
How do I build a select drop-down, radio button or checkbox group?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I have a 'select all' option in a checkbox group?
How do I build a select drop-down, radio button or checkbox group?
P.S: I'm just an automated service😉
No, my problem is different😟
I don't understand where I need to put this code...
In a custom code?
In a custom code?
<?php
$color_array = array(
1 => 'green',
2 => 'blue',
3 => 'red',
4 => 'white'
);
$color_names = array();
foreach ( $form->data['colors'] as $v ) {
$color_names[] = $color_array[$v];
}
$form->data['color_names'] = implode(', ', $color_names);
?>
Hi amandocurcio,
If you need to use it then it would go in a Custom Code action in the form On Submit event. But it might be simpler to just change the options list in the drop-down element.
Bob
If you need to use it then it would go in a Custom Code action in the form On Submit event. But it might be simpler to just change the options list in the drop-down element.
green=green
blue=blue
red=red
white=white
Bob
Perhaps I do not explain well🙂
On the first page I have a checkbox group ( field name: 'colors[]', options: green = green blue = blue red = red white = white )
On the second page I have a custom code with code {colors}.
When on the first page I choose the colors white and blue, the second page I have this string : array ( 0 = > ' blue ' , 1 = > ' white ' , ), instead I need to display: blue, white
How can I do?🙂
On the first page I have a checkbox group ( field name: 'colors[]', options: green = green blue = blue red = red white = white )
On the second page I have a custom code with code {colors}.
When on the first page I choose the colors white and blue, the second page I have this string : array ( 0 = > ' blue ' , 1 = > ' white ' , ), instead I need to display: blue, white
How can I do?🙂
Hi armandocurcio
Please drag a Handle Arrays action into the OnSubmit event and move it up before the Email action. See the end of the FAQ.
Bob
Please drag a Handle Arrays action into the OnSubmit event and move it up before the Email action. See the end of the FAQ.
Bob
I don't understand😟
Hi armandocurcio,
Your image is so big that it is impossible to read easily here.
If you are using the green=green options list then you do not need the Custom Code at all, At present it may well over-write the submitted values.
The Custom element in Page 2 is before the Handle Arrays action (which is in the On Submit event and so is only run after Page 2 submits). That is why you still see the array in Page 2.
Adding Debugger actions temporarily will give you a clearer view of what is happening.
Bob
Your image is so big that it is impossible to read easily here.
If you are using the green=green options list then you do not need the Custom Code at all, At present it may well over-write the submitted values.
The Custom element in Page 2 is before the Handle Arrays action (which is in the On Submit event and so is only run after Page 2 submits). That is why you still see the array in Page 2.
Adding Debugger actions temporarily will give you a clearer view of what is happening.
Bob
This topic is locked and no more replies can be posted.