• Resolved ericsundell2

    (@ericsundell2)


    Hi

    I got this setup.

    V?lj antal deltagare?
    [select valjantaldeltagare include_blank “5” “10” “15” “20”]

    [group group-1]
    <label>Deltagare 6:[text deltagare6 placeholder "Namn och Efternamn"]</label>
    [/group]
    [group group-2]
    Detta ?r grupp 2
    [/group]
    [group group-3]
    Detta ?r grupp 3
    [/group]

    With these conditional rules:

    if valjantaldeltagare equals 5 then show group-1
    if valjantaldeltagare equals 10 then show group-2
    if valjantaldeltagare equals 15 then show group-3

    And its not working. Nothing happens when you choose the diffrent numbers. Its like it aint working. Ive tried to disable diffrent plugins but nothing.

    Anyone got any ideas?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Try changing your form code to this…

    V?lj antal deltagare?
    [select valjantaldeltagare include_blank “5” “10” “15” “20”]
    [group-1]
    <label>Deltagare 6:[text deltagare6 placeholder “Namn och Efternamn”]</label>
    [/group]
    [group-2]
    Detta ?r grupp 2
    [/group]
    [group-3]
    Detta ?r grupp 3
    [/group]

    Thread Starter ericsundell2

    (@ericsundell2)

    Didnt work. ??

    Plugin Author Jules Colle

    (@jules-colle)

    i don’t see any errors in your form on first sight. do you have a link to the live form?

    Thread Starter ericsundell2

    (@ericsundell2)

    Link to form here: https://webbkurser.instruktorerna.se/bestall-kurs-via-faktura/

    It just doesnt work. ive tried changeing alot of the things but nothing seem to work.

    Plugin Author Jules Colle

    (@jules-colle)

    wp_footer() isn’t loaded at the bottom of your page. As staded in the FAQ

    Check if your theme is calling the wp_footer() function. Typically this function will be called in your theme’s footer.php file.
    The conditional fields javascript code is loaded during wp_footer, so a call to this function is crucial. If there is no such call in your theme, go to your theme’s footer.php file and add this code right before the closing </body> tag:
    <?php wp_footer(); ?>

    Thread Starter ericsundell2

    (@ericsundell2)

    Ok. For that site it dont need a footer. Is there a way to just enter some code or script somewhere else, a line of code?

    Meaning not the footer tag but a script tag or something?

    Plugin Author Jules Colle

    (@jules-colle)

    adding wp_footer() will not magically add a footer to your website. It’s just an action hook that can be used by plugins and themes to add javascript to the end of your web pages. It’s kind of crucial that every theme includes a call to wp_footer()

    quote from https://codex.www.ads-software.com/Function_Reference/wp_footer

    ...
    <?php
       /* Always have wp_footer() just before the closing </body>
        * tag of your theme, or you will break many plugins, which
        * generally use this hook to reference JavaScript files.
        */
        wp_footer();
    ?>
    </body>
    </html>
    Thread Starter ericsundell2

    (@ericsundell2)

    Hi

    That was the issue. Thank you for you time.

    Plugin Author Jules Colle

    (@jules-colle)

    no problem! feel free to leave a small review if you have the time.

    Cheers

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Conditional fields not working in 4.8’ is closed to new replies.