Toggle (in form) issue

I have created some forms with text, calendar, numpad fields all working fine (I can retrieve the values entered easily to transfer to a table). However, I am having issues with a number of toggles; all follow the same basic code as shown here:

						<li>
				      <div class="item-content">
				        <div class="item-inner">
				          <div class="item-title">CAIU Incident?</div>
				          <div class="item-after">
				            <label class="toggle toggle-init">
				              <input type="checkbox" name="Incident-CAIU" value="no"><i class="toggle-icon"></i>
				            </label>
				          </div>
				        </div>
				      </div>
				    </li>

The value returned is always ‘No’ regardless of whether the toggle has been clicked or not. I’m sure I’m missing something simple but cannot figure it out! Hopefully someone will suggest how to ensure the value of a toggle field reflects its current position.
Thanks

Yep, toggle/checkbox not change value, hi change checked value

var toggle = app.toggle.get('.toggle');

if (toggle.checked) {
  // do something
}
1 Like

Thanks for the confirmation.
I was afraid it would be so - I have a great many toggles so must decide whether to follow your example or change to radio or other selection tool…
cheers