Conditional Logic Bronze Plan
Show or hide anything inside your form. Use logic based on field values or any other boolean. Write the conditional logic inside a kw-show
or kw-hide
attribute.
Show Logic
<select name="first"> <option value="show">Show Field Below</option> <option value="hide">Hide Field Below</option> </select>
<div kw-show="fields.first === 'show'"> <input type="text" name="second"> </div>
<select name="first"> <option value="show">Show Field Below</option> <option value="hide">Hide Field Below</option> </select>
<div data-kw-show="fields.first === 'show'"> <input type="text" name="second"> </div>
Hide Logic
<select name="first"> <option value="show">Show Field Below</option> <option value="hide">Hide Field Below</option> </select>
<div kw-hide="fields.first === 'hide'"> <input type="text" name="second"> </div>
<select name="first"> <option value="show">Show Field Below</option> <option value="hide">Hide Field Below</option> </select>
<div data-kw-hide="fields.first === 'hide'"> <input type="text" name="second"> </div>
Notice anything wrong in our docs? Let us know.