Support » Plugin: Conditional Fields for Contact Form 7 » Conditional field required

  • Resolved jonathanbiasella

    (@jonathanbiasella)


    Hi I can not make conditional fields mandatory. I leave my code

    <fieldset>
    
    <p>
    <label for="book-date">Data di Arrivo</label>[date book-date id:book-date date-format:dd-mm-yy first-day:1 watermark "gg-mm-aaaa"]</p>
    <p>
    <label for="book-date">Data di Partenza</label>[date book-nights id:book-date date-format:dd-mm-yy first-day:1 watermark "gg-mm-aaaa"]</p>
    
    <p>
    <label for="book-adults">Adulti</label>[select* book-adults id:book-adults  default "1" "2" "3" "4" "5" ]</p>
    
    <p class="float">
    <label for="book-children-0-2">Bambini (0-11)</label>[select bambini  "" "1" "2" "3" "4"] </p>
    
    [group group-529]
    [group eta1]
    <p class="float paddingLeft10">
    <label for="book-children-0-2">Età 1</label>[select* eta-1 first_as_label "-" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11"]</p>
    [/group]
    
    [group eta2]
    <p class="float paddingLeft10">
    <label for="book-children-0-2">Età 1</label>[select* eta-1 include_blank "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11"]</p>
    <p class="float paddingLeft10">
    <label for="book-children-3-11">Età 2</label>[select* eta-2 include_blank "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11"]</p>
    [/group]
    
    [group eta3]
    <p class="float paddingLeft10">
    <label for="book-children-0-2">Età 1</label>[select* eta-1 include_blank "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11"]</p>
    <p class="float paddingLeft10">
    <label for="book-children-3-11">Età 2</label>[select* eta-2 include_blank "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11"]</p>
    <p class="float paddingLeft10">
    <label for="book-children-3-11">Età 3</label>[select* eta-3 include_blank "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11"]</p>
    [/group]
    
    [group eta4]
    <p class="float paddingLeft10">
    <label for="book-children-0-2">Età 1</label>[select* eta-1 include_blank "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11"]</p>
    <p class="float paddingLeft10">
    <label for="book-children-3-11">Età 2</label>[select* eta-2 include_blank "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11"]</p>
    <p class="float paddingLeft10">
    <label for="book-children-3-11">Età 3</label>[select* eta-3 include_blank "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11"]</p>
    <p class="float paddingLeft10">
    <label for="book-children-3-11">Età 4</label>[select* eta-4 include_blank "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11"]</p>
    [/group]
    
    [/group]
    <p style="clear:both">
    <label for="book-rooms">Tipologia Camera</label>[select* book-rooms id:book-rooms first_as_label "-" "Camera Classic Standard" "Camera Vista Mare" "Camera Superior"]</p>
    <p style="clear:both">
    <label for="book-rooms">Trattamento</label>[select* book-service id:book-rooms first_as_label "-" "Camera e colazione" "Mezza pensione" "Pensione completa"]</p>
    </fieldset>
    
    <fieldset>
    <p>
    <label for="your-name">Il tuo Nome</label>[text* your-name id:your-name] </p>
    
    <p>
    <label for="your-phone">Il tuo Telefono</label>[text* your-phone id:your-phone] </p>
    
    <p>
    <label for="your-email">La tua E-mail</label>[email* your-email id:your-email] </p>
    
    <p>
    <label for="your-message">Qual è la tua Richiesta?</label>[textarea* your-message id:your-message] </p>
    
    <label class="cgt-cf-privacy">[acceptance privacy] <br/>Si, acconsento al trattamento dei miei dati personali ai sensi della legge 196/2003 Italiana</a></label>
    
    <p>[submit class:submit "Invia la tua Richiesta"]</p>
    </fieldset>

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    by popular demand, mandatory fields inside conditional groups will only cause validation errors if they are visible during form submission.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.