Checkboxes in Email
Permalink Browser Info Environment
Part of my form has a bunch of checkboxes but if someone checks multiple items they all show up on one line in the email. How can I break these apart into individual values that I can then separate by commas or line breaks? Ideally, it would be great if I could loop through those values in the answer_set.php file so I can grab each one individually. I'm guessing each checkbox value is originally stored in an array but I'm not sure how I can break each value out of the array separately?
Could you explain how to do this in answer_set.php?
Here's what the checkbox part of answer_set.php looks like for me:
$this->answers[$field->ffID]['value'] just returns all checkbox values merged together with spaces in between each one. How can I break them apart?
Could you explain how to do this in answer_set.php?
Here's what the checkbox part of answer_set.php looks like for me:
if($field->type == 'Checkbox'){ $emailData .= "<b>" . strip_tags($field->label) . "\n </b><br />"; $emailData .= strip_tags($this->answers[$field->ffID]['value']) . "\n\n <br /><br />"; }
$this->answers[$field->ffID]['value'] just returns all checkbox values merged together with spaces in between each one. How can I break them apart?
Type: | Discussion |
---|---|
Status: | New |