statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

Form-Bug with false/true #2438

Open wm-simon opened 5 years ago

wm-simon commented 5 years ago

If you save data from a form to an hidden input fields with value = true, the input is saved as 'true'. Now the toggle fieldset cant read the setting, because of the marks.

<input type="hidden" name="field" value="true">
<input type="hidden" name="field" value=true>
<input type="hidden" name="field" value=1>

// Output in yaml:
field: 'true' // Toggle shows false
// field: true // Toggle shows true

This happens with all examples.