# Autofill check box

**URL:** <https://community.silverfin.com/t/autofill-check-box/1376>\
**Category:** Templates\
**Tags:** variables, input, if, attribute\_boolean\
**Created:** [February 7, 2019, 8:48am UTC](https://community.silverfin.com/t/autofill-check-box/1376 "2019-02-07T08:48:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![neilmiller](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@neilmiller](https://community.silverfin.com/u/neilmiller)\
**Post date:** [February 7, 2019, 8:48am UTC](https://community.silverfin.com/t/autofill-check-box/1376/1 "2019-02-07T08:48:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kimberly\_Vlietinck](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/kimberly_vlietinck/32/1496_2.png) [@Kimberly\_Vlietinck](https://community.silverfin.com/u/Kimberly_Vlietinck)\
**Post date:** [February 7, 2019, 9:27am UTC](https://community.silverfin.com/t/autofill-check-box/1376/2 "2019-02-07T09:27:21Z")

</div>

Hi @neilmiller,

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

```auto
| {% 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

---

<div class="post-metadata">

**Author:** ![neilmiller](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@neilmiller](https://community.silverfin.com/u/neilmiller)\
**Post date:** [February 7, 2019, 10:22am UTC](https://community.silverfin.com/t/autofill-check-box/1376/3 "2019-02-07T10:22:56Z")

</div>

Hi Kimberley, thank you very much that works very well 😄
