Title: Dynamic Fields
Last modified: July 29, 2018

---

# Dynamic Fields

 *  Resolved [mstudioIL](https://wordpress.org/support/users/mstudioil/)
 * (@mstudioil)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/dynamic-fields-6/)
 * Can I create dynamic Fields?
    I want to make travel registration, where the number
   of field is const but the number of travelers are changes. I want to the user
   enter the number of travelers and then they will have rows as the number they
   entered

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

 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10539185)
 * You could do this by creating a condition for each number until. Fox example 
   if you would allow max 10 people
 *     ```
       if [select] equals 1 then show [group-1]
       if [select] equals 2 then show [group-1]
       if [select] equals 2 then show [group-2]
       if [select] equals 3 then show [group-1]
       if [select] equals 3 then show [group-2]
       if [select] equals 3 then show [group-3]
       ```
   
 * … and so on
    -  This reply was modified 7 years, 10 months ago by [Jules Colle](https://wordpress.org/support/users/jules-colle/).
 *  Thread Starter [mstudioIL](https://wordpress.org/support/users/mstudioil/)
 * (@mstudioil)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10539692)
 * Thanks, I think I try it or just show all the fields.
    I asked because it is 
   annoying to create inputs like name-1, email-1, phone-1 name-2, email-2, phone-
   2 and so on… if it was dynamic it was easier
 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10540633)
 * I’m working on a repeater field which will be added to [Conditional Fields Pro](https://bdwm.be/wpcf7cf/contact-form-7-conditional-fields-pro/)
 *  Thread Starter [mstudioIL](https://wordpress.org/support/users/mstudioil/)
 * (@mstudioil)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10542821)
 * That will be nice, what to pro version will be?
 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10543746)
 * the pro version will be a pro version 🙂
 *  Thread Starter [mstudioIL](https://wordpress.org/support/users/mstudioil/)
 * (@mstudioil)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10544049)
 * So what will be on her?
    You making pro-pro version? 🙂
 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10546419)
 * The first version will have relational operators, support for regular expressions
   and a toggle button. You can test it out here: [https://bdwm.be/wpcf7cf/contact-form-7-conditional-fields-pro/](https://bdwm.be/wpcf7cf/contact-form-7-conditional-fields-pro/)
 *  Thread Starter [mstudioIL](https://wordpress.org/support/users/mstudioil/)
 * (@mstudioil)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10546463)
 * Thanks
 *  Thread Starter [mstudioIL](https://wordpress.org/support/users/mstudioil/)
 * (@mstudioil)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10617887)
 * Hey, I looked again at the example you gave and I not sure I understand it right.
 *     ```
       if [select] equals 1 then show [group-1]
       if [select] equals 2 then show [group-1]
       if [select] equals 2 then show [group-2]
       if [select] equals 3 then show [group-1]
       if [select] equals 3 then show [group-2]
       if [select] equals 3 then show [group-3]
       ```
   
 * this is the one, if the equals 2 it show group 1 and group 2?
 *  Thread Starter [mstudioIL](https://wordpress.org/support/users/mstudioil/)
 * (@mstudioil)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10631154)
 * I think I got it, it can be nice there was option the copy condition.
    How I 
   can control the look of the sent message? I look and you example, but did not
   understand. Here is part of the form (I have 5 groups)
 *     ```
       [group group-passenger-1]
       	<div class="vc_col-sm-12 passenger">
       		<div class="bookingFormRow">
       			<strong>Passenger 1</strong>
       		</div>
       		<div class="bookingFormRow">
       			<div class="vc_col-sm-2">
       				<label for="bookinGenter-1">Male/Female</label>[select* booking-genter-1 id:bookinGenter-1 "Male" "Female"]
       			</div>
       			<div class="vc_col-sm-3">
       				<label for="bookingFullName-1">Name</label>[text* booking-full-name-1 id:bookingFullName-1]
       			</div>
       			<div class="vc_col-sm-3">
       				<label for="bookingPassportNumber-1">Passport number</label>[text* booking-passport-number-1 id:bookingPassportNumber-1]
       			</div>
       			<div class="vc_col-sm-4">
       				<label for="bookingBirthdate-1">Birth date</label>[date* booking-birth-date-1 id:bookingBirthdate-1]
       			</div>
       		</div>
       		<div class="bookingFormRow">
       			<div class="vc_col-sm-4">
       				<label for="bookingPassportValid-1">Passport valid</label>[date* booking-passport-valid-1 id:bookingPassportValid-1]
       			</div>
       			<div class="vc_col-sm-4">
       				<label for="bookingcitizenship-1">Citizenship</label>[text* booking-citizenship-1 id:bookingcitizenship-1]
       			</div>
       			<div class="vc_col-sm-4">
       				<label for="bookingMeal-1">Meals</label>[text* booking-meal-1 id:bookingMeal-1]
       			</div>
       		</div>
       		<div class="bookingFormRow">
       			<div class="vc_col-sm-4">
       				<label for="bookingPass-1">Passport photo</label>[file* booking-Pass-1 limit:4mb filetypes:gif|png|jpg|jpeg id:bookingPass-1]
       			</div>
       			<div class="vc_col-sm-4">
       				<label for="bookingDrive-1">Driving photo</label>[file* booking-Drive-1 limit:4mb filetypes:gif|png|jpg|jpeg id:bookingDrive-1]
       			</div>
       			<div class="vc_col-sm-4">
   
       			</div>
       		</div>
       	</div>
       	[/group]
       	[group group-passenger-2]
       	<div class="vc_col-sm-12 passenger">
       		<div class="bookingFormRow">
       			<strong>Passenger 2</strong>
       		</div>
       		<div class="bookingFormRow">
       			<div class="vc_col-sm-2">
       				<label for="bookinGenter-2">Male/Female</label>[select booking-genter-2 id:bookinGenter-2 "Male "Female"]
       			</div>
       			<div class="vc_col-sm-3">
       				<label for="bookingFullName-2">Name</label>[text booking-full-name-2 id:bookingFullName-2]
       			</div>
       			<div class="vc_col-sm-3">
       				<label for="bookingPassportNumber-2">Passport number</label>[text booking-passport-number-2 id:bookingPassportNumber-2]
       			</div>
       			<div class="vc_col-sm-4">
       				<label for="bookingBirthdate-2">Birth date</label>[date booking-birth-date-2 id:bookingBirthdate-2]
       			</div>
       		</div>
       		<div class="bookingFormRow">
       			<div class="vc_col-sm-4">
       				<label for="bookingPassportValid-2">Passport valid</label>[date booking-passport-valid-2 id:bookingPassportValid-2]
       			</div>
       			<div class="vc_col-sm-4">
       				<label for="bookingcitizenship-2">Citizenship</label>[text booking-citizenship-2 id:bookingcitizenship-2]
       			</div>
       			<div class="vc_col-sm-4">
       				<label for="bookingMeal-2">Meals</label>[text booking-meal-2 id:bookingMeal-2]
       			</div>
       		</div>
       		<div class="bookingFormRow">
       			<div class="vc_col-sm-4">
       				<label for="bookingPass-2">Passport photo</label>[file booking-Pass-2 limit:4mb filetypes:gif|png|jpg|jpeg id:bookingPass-2]
       			</div>
       			<div class="vc_col-sm-4">
       				<label for="bookingDrive-2">Driving photo</label>[file booking-Drive-2 limit:4mb filetypes:gif|png|jpg|jpeg id:bookingDrive-2]
       			</div>
       			<div class="vc_col-sm-4">
   
       			</div>
       		</div>
       	</div>
       	[/group]
       ```
   
 * How I show only the selected number of fields?
    Can I do it?
    -  This reply was modified 7 years, 9 months ago by [mstudioIL](https://wordpress.org/support/users/mstudioil/).
 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10631183)
 * good to know. You can go wild with the import/export feature to do some badass
   copy pasting
    -  This reply was modified 7 years, 9 months ago by [Jules Colle](https://wordpress.org/support/users/jules-colle/).
 *  Thread Starter [mstudioIL](https://wordpress.org/support/users/mstudioil/)
 * (@mstudioil)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10631363)
 * Thanks the import/export can help, I did manually took little more time.
    I also
   use this for the sent mail and it works good
 *     ```
       [group-passenger-1]
       		<tr>
       			<td style="text-align:right;vertical-align:top;direction:rtl;" colspan="7">
       				<strong style="font-size:14px;">נוסע 1</strong>
       			</td>
       		</tr>
       		<tr>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-genter-1]
       			</td>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-full-name-1]
       			</td>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-passport-number-1]
       			</td>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-birth-date-1]
       			</td>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-passport-valid-1]
       			</td>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-citizenship-1]
       			</td>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-meal-1]
       			</td>
       		</tr>
       		[/group-passenger-1]
       		[group-passenger-2]
       		<tr>
       			<td style="text-align:right;vertical-align:top;direction:rtl;" colspan="7">
       				<strong style="font-size:14px;">נוסע 2</strong>
       			</td>
       		</tr>
       		<tr>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-genter-2]
       			</td>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-full-name-2]
       			</td>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-passport-number-2]
       			</td>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-birth-date-2]
       			</td>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-passport-valid-2]
       			</td>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-citizenship-2]
       			</td>
       			<td style="text-align:right;vertical-align:top;direction:rtl;">
       				[booking-meal-2]
       			</td>
       		</tr>
       		[/group-passenger-2]
       ```
   
 * I missed something or the code is right? I did not enter the table tags
 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10631420)
 * looks good
 *  Thread Starter [mstudioIL](https://wordpress.org/support/users/mstudioil/)
 * (@mstudioil)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10631632)
 * OK, thanks for all the help

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

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

 * ![](https://ps.w.org/cf7-conditional-fields/assets/icon-256x256.png?rev=2072595)
 * [Conditional Fields for Contact Form 7](https://wordpress.org/plugins/cf7-conditional-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-conditional-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-conditional-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-conditional-fields/reviews/)

 * 14 replies
 * 2 participants
 * Last reply from: [mstudioIL](https://wordpress.org/support/users/mstudioil/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/dynamic-fields-6/#post-10631632)
 * Status: resolved