forms: Implement support for checkbox fields

Also fix crash if the [name] of a widget element started with a digit
character.