Home › Forums › Quform PHP › Trouble Posting MultiCheckbox Array Data to Email
- This topic has 1 reply, 2 voices, and was last updated 8 years, 6 months ago by Ally.
- AuthorPosts
- May 3, 2016 at 1:04 pm #18819rauschusaParticipant
Hello,
I am trying to write a carefully scripted email by displaying Submitted Form Data within an html email’s code – and that’s going well. Except that when I try to post data from a multi checkbox array by using getValueHtml instead of getValue, I get a fatal error.Fatal error: Call to undefined method Quform_Element::getValueHtml() in /home/…/rauschusa/quform/lib/Quform3.php on line 180
And if I use getValue, the email generates a different error in the email text.
Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/../rauschusa/quform/lib/Quform3.php on line 215
In the error code, I can see that the form was writing the email fine, and has pulled the data from the preceding input, then stops abruptly at the first multi checkbox. And if I use getValue for the entire email, every normal input feeds into the email well, but all of the multi checkboxes return the line 215 error.
The email code:
<b>Product Applications:</b> <?php echo Quform::escape($form->getValueHtml('product'));?>
Sample from form code:
<div class="quform-option"> <label><input name="product[]" class="checks" value="Mainline Inspection" type="checkbox" /> Mainline Inspection</label></div> <div class="quform-option"> <label><input name="product[]" class="checks" value="Crack Measurement Upgrade" type="checkbox" /> Crack Measurement Upgrade</label> </div>
Process code:
$product = new Quform_Element('product[]', 'Applications for your system'); $product->addValidator('required'); $form->addElement($product);
I renamed the Quform.php file, but it’s the 06/2015 file, I changed the name to make sure I do not break old Quforms that I wrote with the 2012 or 2014 editions I have used.
Please let me know what I am doing wrong and how I can get this running. Thanks.
- This topic was modified 8 years, 6 months ago by rauschusa.
May 4, 2016 at 6:54 pm #18827AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.