Hi guys,
I want to build a form with conditional fields (shown or hidden based on the field values of other fields). I could use a jQuery plugin (http://www.jqueryscript.net/form/jQuery-Plugin-For-Conditional-Form-Fields-conditionize-js.html) to make things easier but I would have to extend the GRAV forms plugin to accept new markdown attributes (data-cond-option and data-cond-value) to make it work. The rendered field html has to be wrapped with a div with extra attributes like this
<div class="conditional" data-cond-option="example" data-cond-value="yes">
.......
</div>
How can I make GRAV process field markdown like this:
-
name: mytextfield
label: Your Name
type: text
classes: conditional
data-cond-option: example
data-cond-value: yes
Or is there a better way to build conditional form fields in GRAV?