upgrade: Add new flags field to %form_field

This will be used for greater flexibility in visibility and requirement
settings.