Advanced getting values from duplicated inputs on email confirmation

Home Forums Quform WordPress Advanced getting values from duplicated inputs on email confirmation

This topic is: not resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #19712
    cvakator
    Participant

    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 300

    On email with tags I get strange result, like:

    10
    10020
    20030
    300

    It 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.
    #19732
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #19765
    cvakator
    Participant

    Thank 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.
    #19798
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy