• Resolved benhartwich

    (@yoursql719)


    Hi,

    when I set the signature field within a conditional field I get a javascript error:
    signature_pad.min.js?ver=4.2:1 Uncaught TypeError: Cannot read property ‘push’ of undefined
    at i._strokeUpdate (signature_pad.min.js?ver=4.2:1)
    at a (signature_pad.min.js?ver=4.2:1)

    I can´t fill out the signature field.

    Regards,

    • This topic was modified 8 years, 5 months ago by benhartwich.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter benhartwich

    (@yoursql719)

    Link to the plugin: https://wordpress.org/plugins/cf7-conditional-fields/

    • This reply was modified 8 years, 5 months ago by benhartwich.
    Plugin Author tameroski

    (@tameroski)

    Hi,

    What are you trying to achieve exactly ?
    I have some basic test cases with CF7 conditional fields that are working just fine.
    Can you paste your form and conditional fields configuration ?

    Thread Starter benhartwich

    (@yoursql719)

    Hi,

    I try to NOT enable the signature field on the group “unterschrift” whenever “praktikant” is selected at group “weitere-angaben”.

    
    [group weitere-angaben]
    <label>Sie als Antragsteller sind:
    [select* personangaben include_blank "Fest angestellt" "Gast oder Praktikant/-in" "Hilfskraft" "Gasthörer"]</label>
    [/group]
    [group vorgesetzter]
    <label>[text* name-vorgesetzter placeholder "Name Ihres Vorgesetzten"]</label>
    <label>[tel* telefon-vorgesetzter placeholder "Telefonnummer Ihres Vorgesetzten"]</label>
    <label>[email* email-chef placeholder "E-Mail Adresse Ihres Vorgesetzten"]</label><br>
    <label>Unterschrift Ihres Vorgesetzten:
    [signature* unterschrift background:#e0e0e0]</label><br>
    [/group]
    

    Rule: personenangaben not equals Gasthörer then show vorgesetzter.

    • This reply was modified 8 years, 5 months ago by benhartwich.
    Plugin Author tameroski

    (@tameroski)

    Seams fine here. The signature is hidden if Gasthörer is selected. And i can write to it if not. Must be something else.
    What about the weitere-angaben group ?
    Anyway, having label tags around input fields is not a good idea (not W3C compliant). I don’t think it’s linked to your issue but it can’t hurt to have a proper HTML code in the form.

    Plugin Author tameroski

    (@tameroski)

    Update : i have the error too on Chrome. Just remove those label tags (use a fieldset or div if you want some kind of field wrapper) and it’ll get fixed.

    Thread Starter benhartwich

    (@yoursql719)

    Thanks – it seems to be related to twenty sixteen theme.

    Contact form recommends using <label> tags – what would you recommend? <p>?

    Plugin Author tameroski

    (@tameroski)

    I don’t think they’d recommend this, i think you might have misinterpreted something.
    You can use any wrapping element : p , div, span …
    You can even leave the fields unwrapped, as CF7 is wrapping them automatically with span tags.

    Thread Starter benhartwich

    (@yoursql719)

    Contact Form wraps every element on a fresh contact form or the demo contact form with <label> tags. Perhaps you can insert a check for your plugin, that it could break signature field when somebody is using the label wrapper.

    Plugin Author tameroski

    (@tameroski)

    You’re right, that’s the default layout now … This is implicit label association which is not forbidden but it’s not the recommended way of doing it.

    Anyway, i’ll try to find a workaround for this or add a notice like you suggest.

    Thanks for reporting this.

    Thread Starter benhartwich

    (@yoursql719)

    Thanks!

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

The topic ‘Incompatbility with Conditional Fields (Contact Form 7)’ is closed to new replies.