How to Create Checkbox in Code Studio

Hi,

I’ve created a row of checkboxes taken from the radio button choice classes which are linked to multiple boolean values but for some reason it won’t toggle when I press on them.

I haven’t found any code for checkboxes and I also can’t seem to send over a true value to have the checkbox automatically filled

the v-if means if there are less linked settings it can ignore the

I have tried the v-model as toggle, switch_value and choice5.

<div v-if=“choice5_label” class=“radio_choices-row”>
  <label class=“custom-control custom-checkbox form-text”>
    <input :name=“mats.input_name + ‘[choice5]’” v-model=“toggle” class=“col-form-value valid_boolean custom-control-input input_boolean custom-checkbox” type=“checkbox”>
    <span class=“custom-control-indicator”></span>
    <span class=“custom-control-description”>{{choice5_label}}</span>
  </label>
</div>

Thanks
Robin

edit: I had an interaction-disabled taken from a higher div. Removing this has allowed for toggling of the checkboxes. I still can’t however take in true from get_template_data and show it

edit: solution found adding checked=“checked” and v-if=“choice5” and another without for v-if="!choice5" worked

<input v-if=“choice5” :name=“mats.input_name + ‘[choice5]’” v-model=“toggle” class=“col-form-value valid_boolean custom-control-input input_boolean custom-checkbox” type=“checkbox” checked=“checked”>
<input v-if="!choice5" :name=“mats.input_name + ‘[choice5]’” v-model=“toggle” class=“col-form-value valid_boolean custom-control-input input_boolean custom-checkbox” type=“checkbox”>

Hi Robin
I’m glad you found a solution and thanks for sharing it with the Community.
Cheers, Tony