Hello,
i want checkboxes in 5 columns and 10 rows (50 checkboxes). I tried it in the HTML field and it is displayed in the frontend. After sending, the field in the email is empty.
Is there a solution?
i want checkboxes in 5 columns and 10 rows (50 checkboxes). I tried it in the HTML field and it is displayed in the frontend. After sending, the field in the email is empty.
Is there a solution?
You may use Custom HTML or 10 checkboxes groups elements
if you use HTML then you need to use a PHP action before the email to loop over the data and build the checkboxes value list then get it in the email body using
if you use HTML then you need to use a PHP action before the email to loop over the data and build the checkboxes value list then get it in the email body using
{var:php_action_name}
Hi Max,
that sounds good, but I have no idea where to place the php action.
that sounds good, but I have no idea where to place the php action.
Before the email action in the 2nd form page, build the output you need, then return it:
if your PHP action name is php_2 then you can get the $x value in the email body as {var:php_2}
$x = 111;
return $x;
if your PHP action name is php_2 then you can get the $x value in the email body as {var:php_2}
Hi Max,
unfortunately I have no idea about php, could you please give me a simple example with 3 checkboxes
value="1"
value="2"
value="3"
My PHP action name is php_27
I would be very happy if this worked.
unfortunately I have no idea about php, could you please give me a simple example with 3 checkboxes
value="1"
value="2"
value="3"
My PHP action name is php_27
I would be very happy if this worked.
$output = "";
foreach($this->data("checkboxes_name") as $k => $v){
$output .= "\n".$v;
}
return $output;
This will return a multiline list of the checkboxes selected in your list, you can then use it in your Email, or change the formatting in the PHP code.
Hi Max,
my Custom HTML now looks like this, including advanced settings: run php.
But in the email I receive there is no reference to checkboxes 25.
my Custom HTML now looks like this, including advanced settings: run php.
But in the email I receive there is no reference to checkboxes 25.
<div class="mainfield field grouped fields required" data-validationrules='{"identifier":"checkboxes_25_1","rules":[{"type":"minChecked[1]","prompt":"This field is required"}]}' data-vtype="checkboxes" data-uid="25" data-isinput="1">
<label for="checkboxes_25">Checkboxes 25</label><div class="field">
<div class="ui checkbox checkbox" style="margin:0;"><input type="checkbox" value="1" name="checkboxes_25[]" id="checkboxes_25_1" />
<label for="checkboxes_25_1">Option 1</label></div></div><div class="field">
<div class="ui checkbox checkbox" style="margin:0;"><input type="checkbox" value="2" name="checkboxes_25[]" id="checkboxes_25_2" />
<label for="checkboxes_25_2">Option 2</label></div></div><div class="field">
<div class="ui checkbox checkbox" style="margin:0;"><input type="checkbox" value="3" name="checkboxes_25[]" id="checkboxes_25_3" />
<label for="checkboxes_25_3">Option 3</label></div></div></div>
$output = "";
foreach($this->data("checkboxes_25") as $k => $v){
$output .= "\n".$v;
}
return $output;
Did you add {var:php_27} to the email body ?
You need to login to be able to post a reply.