Skip to content

Dealing with the cascade in forms whens using sections #8604

Answered by earthwytch
earthwytch asked this question in Q&A
Discussion options

You must be logged in to vote

In case anyone else ever has this issue, I have dealt with it by setting the section instructions to a variable, and then checking against that variable when it came time to display the field instructions.

{{ sections }}
    <fieldset>
        <legend>
            <h3>{{ display }}</h3>
        </legend>
        <p>{{ daddio = instructions }}{{ daddio }}</p>

    <div>
        {{ fields }}
            {{ if visibility == 'hidden' }}
                {{ field }}
            {{ else }}
                <div id="{{ handle | dashify }}">

                    <label for="{{ handle }}">{{ display }}
                        {{ if instructions != daddio }}<br />{{ instructions }}{{ /if }}
         …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jesseleite
Comment options

@jesseleite
Comment options

Answer selected by earthwytch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants