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?
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
{var:php_action_name}
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
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:
$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}
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
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.
$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.
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Did you add {var:php_27} to the email body ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
yes sure, i tested both variations you described, also with the {var:php_27} at the body of the Custom HTML.