Check box in form.yml

I am trying to implement a check box in an interactive app and I don’t know how to set the default value and then extract the value in the app script. Anyone can quickly help me with this? And even better put it in the docs, https://osc.github.io/ood-documentation/latest/app-development/interactive/form.html#attributes

I have form.yml that has:

  license_type:
    widget: "check_box"
    help: |
      Check to use the College of Engineering teaching license

and want to set default to be unchecked.

Then in template/script.sh.erb, I want a condition based on value of this check box:

<%- if context.license_type is checked -%>
use teaching license
<%- else -%>
use research license
<%- end -%>

and I don’t know how to query the value of the check box.

Or, maybe more general, is there a good HTML or similar documentation that shows how are the values of the different kind of widgets set and interpreted.

Thanks,
MC

It’s 1s and 0s but strings. So that if/else block would look like this:

<%- if context.license_type == "1" -%>
use teaching license
<%- else -%>
use research license
<%- end -%>

Perfect, works like a charm. Thanks.