Support » Plugin: Dynamic Select for Contact Form 7 » Custom field value in a drop down menu

  • I am trying to create a property booking form for a website. I use Contact Form 7 and Advanced Custom Field on the website. I need to create a dropdown menu which will have different number range based on the value from a custom field (created with advanced custom fields). So there is a condition between the dropdown menu and the the custom field value.

    The drop down menu is a number range, it represents the number of guests, so it is different for each property. I have created a custom field “guests” which is a simple number field and I want the drop down menu in Contact Form 7 to have different values based on this field.

    The Contact Form 7 drop down menu requires to enter one value per line, so each value on each line is one option in the dropdown menu.

    In php it would be something like this:

    $value = get_field( "property_number_of_guests" );
    for ($i = 1; $i <= $value; $i++) {
    	echo "<option value=' " . $i . " '>" . $i . "</option>" ;
    	echo  "<br/>";

    Is there any way to create the drop down menu in CF7 with the above functionality, using your plugin?

  • The topic ‘Custom field value in a drop down menu’ is closed to new replies.