Home › Forums › Quform WordPress › Advanced getting values from duplicated inputs on email confirmation
- This topic has 3 replies, 2 voices, and was last updated 7 years, 8 months ago by Ally.
- AuthorPosts
- August 22, 2016 at 9:58 am #19712cvakatorParticipant
Hi everyone,
I have 3 text fields to write width, height and count which I can duplicate those text fields with this script to write different dimensions: https://support.themecatcher.net/quform-wordpress/guides/customization/duplicating-a-text-field-in-the-form.
Unfortunately I don’t know php much how to get those values correctly on confirmation email.
when I write values into each inputs like 10mm 20mm 30, it’s fine, but when I write:
10 20 30
100 200 300On email with tags I get strange result, like:
10
10020
20030
300It probably doesn’t duplicate table rows correctly.
Kindly please, how can I write a proper php loop or array for my custom email to get those values correctly in each table row? Have a look on live form. http://www.wdokna.cz/kontakt/cenova-nabidka-koncept/
Thank you very much.
Attachments:
You must be logged in to view attached files.August 24, 2016 at 7:23 pm #19732AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
August 29, 2016 at 11:16 am #19765cvakatorParticipantThank you very much Ally! That’s perfect! It works nice.
I created custom-email.php file already and it works great. I’m wondered how to put 3 iphorm values into into the table rows like on image. I tried make some experiments with your example but it was quiet messy in results and I don’t know how to make it right like in example 🙁
Can you tell me what am I doing wrong? Thank you very much. 🙂
<table width="100%" border="0"> <tbody> <?php $values = $form->getValue('iphorm_11_65'); if (is_array($values) && count($values)) { echo ' <tr>'; foreach ($values as $value) { echo '<td width="20%">' . esc_html($value) . '</td>'; } echo ' </tr>'; } ?> <?php $values = $form->getValue('iphorm_11_66'); if (is_array($values) && count($values)) { echo ' <tr>'; foreach ($values as $value) { echo '<td width="20%">' . esc_html($value) . '</td>'; } echo ' </tr>'; } ?> <?php $values = $form->getValue('iphorm_11_67'); if (is_array($values) && count($values)) { echo ' <tr>'; foreach ($values as $value) { echo '<td width="20%">' . esc_html($value) . '</td>'; } echo ' </tr>'; } ?> </tbody> </table>
Attachments:
You must be logged in to view attached files.September 1, 2016 at 9:51 pm #19798AllySupport 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.