Title: Repeatable Fields
Last modified: November 26, 2018

---

# Repeatable Fields

 *  [Amit bhalani](https://wordpress.org/support/users/amit648/)
 * (@amit648)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/repeatable-fields-4/)
 * Hello,
 * when I use your plugin so not attach extra repeatable fields in pdf.
    Please 
   give me a solution for that problem.
 * Use repeater plugin – [Contact Form 7 – Repeatable Fields](https://wordpress.org/plugins/cf7-repeatable-fields/)
 * Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [bridgejamie](https://wordpress.org/support/users/bridgejamie/)
 * (@bridgejamie)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/repeatable-fields-4/#post-10997007)
 * Yes, I also need this to work. Any update on how this can work?
 * Amit Bhawani, did you find any solutions?
 * Thanks
 *  Thread Starter [Amit bhalani](https://wordpress.org/support/users/amit648/)
 * (@amit648)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/repeatable-fields-4/#post-10997343)
 * Yes, [@bridgejamie](https://wordpress.org/support/users/bridgejamie/) I got this
   solution.
 * Please email this [amitbhalani648@gmail.com](https://wordpress.org/support/topic/repeatable-fields-4/amitbhalani648@gmail.com?output_format=md)
   and send your requirement.
 * Thanks.
 *  [natiia](https://wordpress.org/support/users/nataliiasalii/)
 * (@nataliiasalii)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/repeatable-fields-4/#post-11444370)
 * Hi,
    I would like to get the solution too.
 * Thanks
 *  Thread Starter [Amit bhalani](https://wordpress.org/support/users/amit648/)
 * (@amit648)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/repeatable-fields-4/#post-11662127)
 * Hello, [@nataliiasalii](https://wordpress.org/support/users/nataliiasalii/)
 * Please share your website link.
 * Thanks
 *  [Trynda E. Adair](https://wordpress.org/support/users/tryndaadair/)
 * (@tryndaadair)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/repeatable-fields-4/#post-12152060)
 * Is anyone willing to post a solution to this?
 *  Thread Starter [Amit bhalani](https://wordpress.org/support/users/amit648/)
 * (@amit648)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/repeatable-fields-4/#post-12153248)
 * Hello [@tryndaadair](https://wordpress.org/support/users/tryndaadair/)
 * Yes, [@tryndaadair](https://wordpress.org/support/users/tryndaadair/) I got this
   solution.
 * Thanks
 *  [Trynda E. Adair](https://wordpress.org/support/users/tryndaadair/)
 * (@tryndaadair)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/repeatable-fields-4/#post-12156105)
 * Would you mind sharing how you got this setup or a link to a how to?
 * Thank you 🙂
 *  Thread Starter [Amit bhalani](https://wordpress.org/support/users/amit648/)
 * (@amit648)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/repeatable-fields-4/#post-12157238)
 * Hello [@tryndaadair](https://wordpress.org/support/users/tryndaadair/)
 * I have created custom code on my side using this plugin.
 * Can you share with me your contact form design?
 * Thanks
 *  [Trynda E. Adair](https://wordpress.org/support/users/tryndaadair/)
 * (@tryndaadair)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/repeatable-fields-4/#post-12213803)
 * Not sure if anyone is still looking for a solution to this, but I put together
   something (albeit not in an overly elegant way of implementing since I unfortunately
   don’t have time set aside for building a custom plugin to handle this and had
   to modify the base plugin).
 * In my use case a new PDF and email was required for each dynamic field added,
   so in the send-pdf.php file I wrapped the PDF generation (wpcf7pdf_send_pdf function)
   and mail (wpcf7pdf_mail_components function, adding an additional wp_mail function
   to send multiple emails) in the following if statement that would check if groups
   were present and iterate through the number of groups to change the variables
   and create multiple PDFs/emails with dynamic content based on the users submission.
 *     ```
       if ( isset( $_POST['_wpcf7_groups_count'] ) ) {
   
       	foreach ( $_POST['_wpcf7_groups_count'] as $group_id => $group_sent_count ) {
   
       		for ( $i = 1; $i <= $group_sent_count; $i++ ) {	
       			$text = preg_replace( '/__1(\s|\])/', "__{$i}]", trim($meta_values['generate_pdf']));
   
       			// Generate PDF Code Goes Here
       		}
       	}
       }
       else
       {
       	// Generate PDF Like Normal
       }
       ```
   
 * In the ‘Personalize your PDF’ area I set the repeatable fields to have the __1
   in the name so the code would be able to find the variables when passed via $
   _POST and change out the number based on the for loops position (although I think
   it will work either way, I just haven’t tested as of yet to confirm). This solution
   leveraged the Contact Form 7 – Repeatable Fields ([https://wordpress.org/plugins/cf7-repeatable-fields/](https://wordpress.org/plugins/cf7-repeatable-fields/))
   plugin. Hope this helps someone somehow.
 *  [johnyswork](https://wordpress.org/support/users/johnyswork/)
 * (@johnyswork)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/repeatable-fields-4/#post-12648208)
 * [@tryndaadair](https://wordpress.org/support/users/tryndaadair/) Thanks so much!
   🙂
 *  [sheryleo](https://wordpress.org/support/users/sheryleo/)
 * (@sheryleo)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/repeatable-fields-4/#post-13066105)
 * Hi [@amit648](https://wordpress.org/support/users/amit648/)
 * I need this too. Please help me.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Repeatable Fields’ is closed to new replies.

 * ![](https://ps.w.org/send-pdf-for-contact-form-7/assets/icon-256x256.png?rev=
   2194770)
 * [Send PDF for Contact Form 7](https://wordpress.org/plugins/send-pdf-for-contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/send-pdf-for-contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/send-pdf-for-contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/send-pdf-for-contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/send-pdf-for-contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/send-pdf-for-contact-form-7/reviews/)

## Tags

 * [contact-form](https://wordpress.org/support/topic-tag/contact-form/)
 * [pdf](https://wordpress.org/support/topic-tag/pdf/)

 * 11 replies
 * 4 participants
 * Last reply from: [sheryleo](https://wordpress.org/support/users/sheryleo/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/repeatable-fields-4/#post-13066105)
 * Status: not resolved