Autofill check box

Hello,

I have the following bit of code:

| {% input period.custom.CPSignoffC5.criteria as:select options:“As Manager I confirm the assignmnet DOES require an aduit:|As Manager I confirm the assignmnet DOES NOT require an audit.”%}
|{% input custom.check.locked as:boolean %}{% if period.custom.CPSignoffC5.criteria != blank %}{{ custom.check.locked == true}}{% endif %}

I am trying to link the answer to the first bit to the check box after it. So what I would like to happen is that if the dropdown is ‘blank’ the check box is not filled but if the dropdown is not ‘blank’ then the check box automatically switches itself on. I have tried using the ‘== true’ but that has not worked.

Hope that makes sense.

Thank you.

Neil

Hi @neilmiller,

I made some adjustments to your code and worked with a default for the checkbox to make it work:

| {% input period.custom.CPSignoffC5.criteria as:select options:"As Manager I confirm the assignmnet DOES require an aduit:|As Manager I confirm the assignmnet DOES NOT require an audit." %}
| {% if period.custom.CPSignoffC5.criteria != blank %}{% assign default_checkbox = true %}{% else %}{% assign default_checkbox = false %}{% endif %}
  {% input custom.check.locked as:boolean default:default_checkbox %}

I hope this is what you were aiming for. Let me know if you have any questions about the adjusted code.

Kind regards,
Kimberly

Hi Kimberley, thank you very much that works very well :smile: