• Hello!

    Is there anyway to insert a blank item as the first option, as with “include_blank” on a vanilla Contact Form 7 drop-down menu?

    Thank you for your time.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Huebner

    (@hube2)

    Yes, you can include a blank value, this is given in the example. Just set the first element of the array to the value for the label "" and the value to an empty string

    
    $values = array(
      'Please make a selection' => ''
      'label for value 1' => 'value 1'
    );
    

    @hube2 While this does seem to validate, it doesn’t give the user any indication whenever it is invalid. For example I have the following:

    [dynamicselect* user-category id:user-category first_as_label class:text class:half class:mright "wpcf7_tax_listing_select"]

    Left empty Contact Form 7 states:

    Validation errors occurred. Check your information and submit again.

    But the form neither border colors the field red as invalid or adds the Contact Form 7 class wpcf7-not-valid which leaves the user guessing which required field is empty.

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

The topic ‘Any way to “include_blank”?’ is closed to new replies.