We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34174
    • 67 Posts
    Hi, here's my code. My placeholder (generated from a snippet earlier in the code) correctly outputs Y, however, when an output modifier is appended, it doesn't output anything. Bug?

    <div class="form-group">
      <label class="col-md-4 control-label" for="badge_c_registered">Is the business registered?</label>
      <div class="col-md-6">
        <label class="radio-inline">
          <input type="radio" name="badge_c_registered" id="badge_c_registered1" value="Y"
          [[!+fi.badge_c_registered:FormItIsChecked=`Y`]] | 
          [[+profile.badge_c_registered:FormItIsChecked=`Y`]] |
          [[+profile.badge_c_registered:is=`Y`:then=`checked="checked"`]] |
          [[+profile.badge_c_registered]]  > Y
        </label>
        <label class="radio-inline">
          <input type="radio" name="badge_c_registered" id="badge_c_registered2" value="N"
          [[!+fi.badge_c_registered:FormItIsChecked=`N`]]
          [[+profile.badge_c_registered:is=`N`:then=`checked="checked"`]]
          > N
        </label>
      </div>
    </div>


    You can see in the first input code I tried three different things. Only the last one outputs Y

    Output:

    <input type="radio" name="badge_c_registered" id="badge_c_registered1" value="Y"
                    | 
                    |
                   |
                  Y  > Y
    


    Why is this???

    Thanks in advance.

    This question has been answered by [email protected]. See the first response.

      • 34174
      • 67 Posts
      Really confused by this.

      I created a snippet:

      if ( ($val1 == $checkVal) ) {
        return $output;
      } else {
        return 'val1:'.$val1.'|checkVal:'.$checkVal;
      }


      And the snippet call:

      [[!valueChecked? &val1=`[[+profile.badge_c_registered]]` &checkVal=`Y` &output=`checked="checked"`]]


      but *this* is output:

      val1:Y|checkVal:Y


      How is val1 not equal to checkVal huh
      • discuss.answer
        • 34174
        • 67 Posts
        Problem solved. The getCompanyDetails snippet I was using to populate the placeholders, was itself in a conditional snippet (Fastfield, actually). So I moved it out of that and into the same 'level' as the placeholders.