How to make form_alter act upon boolean choice rather select list I am working on a form_alter() based on Form API states which is about switching a field choice based on the value of a select field as below;

'select[name="field_date_type"]' =&gt; ['value' =&gt; 'allday']


I would like to know what syntax is required for changing the field widget from select to boolean or checkboxes or radios. 

I have tried switching select to boolean, checkbox and radio but none are working for me.

What am I doing wrong?
Assuming you mean checkbox (HTML doesn't have a boolean input type), the property is checked, so you can use:

':input[name="field_date_type"]' =&gt; ['checked' =&gt; TRUE]