• Resolved cellumer

    (@cellumer)


    Hi,

    I use Material Design and you plugin with this code:
    [md-form spacing=”tight”]

    [md-text label=”Uw naam”]
    [text* your-name]
    [/md-text]

    [md-text label=”Uw email”]
    [email* your-email]
    [/md-text]

    [md-text label=”Uw onderwerp”]
    [text* your-subject]
    [/md-text]

    [md-select label=”Uw toestel”]
    [select* Soorttoestel “—Kies uw Toestel—” “Telefoon” “Tablet” “Laptop”]
    [/md-select]

    [group telefoon]
    [md-select label=”Uw telefoon”] [select* Telefoon “– Kies uw telefoon –” “Iphone” “Samsung” “Huawei” “Sony” “Overig”]
    [/md-select]
    [/group]

    [md-textarea label=”Aanvullende informatie”]
    [textarea* your-message]
    [/md-textarea]

    [md-submit]
    [submit “Verstuur”]
    [/md-submit]

    [/md-form]

    I use this Conditional: show [phone] if [Soorttoestel] equals “Telefoon”.

    Do I something wrong?

    Thanks!

    Wouter

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,

    [select* Telefoon “– Kies uw telefoon –” “Iphone” “Samsung” “Huawei” “Sony” “Overig”]

    then

    Try this Conditional: show [Telefoon] if [Soorttoestel] equals “Telefoon”.

    Plugin Author Jules Colle

    (@jules-colle)

    I’m not actively supporting the Material Design plugin. I’m willing to work with the author of the plugin to solve the issue, but I cannot possibly test all CF7 extensions and adapt mine to work with all of them.

    Thread Starter cellumer

    (@cellumer)

    Hi,

    I understand.. thanks!

    Wouter

    Thread Starter cellumer

    (@cellumer)

    Hi,

    I removed Material Design Plugin:
    Uw naam (verplicht)
    [text* your-name]

    Uw email (verplicht)
    [email* your-email]

    Uw toestel
    [select* Soorttoestel “—Kies uw Toestel—” “Telefoon” “Tablet” “Laptop”]

    [group phone]
    [select* phone “– Kies uw telefoon –” “Iphone” “Samsung” “Huawei” “Sony” “Overig”]
    [/group]

    Aanvullende informatie
    [textarea* your-message]

    [submit “Verstuur”]

    with condition:
    show [phone] if [Soorttoestel] equals “Telefoon”

    The group is not showing…

    I also get an error in the console:
    Uncaught SyntaxError: Unexpected end of JSON input in scripts.js of the plugin:
    row 20: form_options = JSON.parse(value);

    • This reply was modified 7 years, 8 months ago by cellumer.
    Plugin Author Jules Colle

    (@jules-colle)

    you cannot have the same name for groups or fields in your form. You have group named phone and a field named phone, please change one of these to something else and then verify your conditions again.

    Thread Starter cellumer

    (@cellumer)

    I did change it:
    Uw naam (verplicht)
    [text* your-name]

    Uw email (verplicht)
    [email* your-email]

    Uw toestel
    [select* Soorttoestel “—Kies uw Toestel—” “Telefoon” “Tablet” “Laptop”]

    [group phone]
    [select* tel “– Kies uw telefoon –” “Iphone” “Samsung” “Huawei” “Sony” “Overig”]
    [/group]

    Aanvullende informatie
    [textarea* your-message]

    [submit “Verstuur”]

    AND

    show [phone] if [Soorttoestel] equals “Telefoon”

    This is also not working, I have the same error.

    Plugin Author Jules Colle

    (@jules-colle)

    I found the error, but I’m afraid it might be a tough one to debug.

    The problem is that the value attribute of the hidden _wpcf7cf_options field is not escaped. It now looks like this:

    <input type="hidden" name="_wpcf7cf_options" value="{"form_id":9,"conditions":[{"then_field":"phone" ..." />

    but it should look like this:

    <input type="hidden" name="_wpcf7cf_options" value="{&quot;form_id&quot;:9,&quot;conditions&quot;:[{&quot;then_field&quot;:&quot;phone&quot; ..." />

    Conditional fields uses a CF7 filter wpcf7_form_hidden_fields to add the hidden field. This filter in it’s turn will call the native wordpress function esc_attr to make sure the attribute is escaped properly. The esc_attr function (wp-includes/formatting.php line 3976) applies another filter called attribute_escape. So, you see, there are a couple if filters exposed where other plugins or your theme might be modifying the flow, causing the attribute not te be escaped.

    The best way to figure out which plugin (or theme) is responsible for this, it’s best to disable all your plugins (except CF7 and Conditional fields) and your theme, and hopefully the problem should be gone. Then start, re-enabling plugins until you figure out which plugin causes the issue.

    Good luck! and sorry for the late reply

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

The topic ‘Groups not showing’ is closed to new replies.