office_hours_form_field_ui_field_edit_form_alter() limits the cardinality options, which makes sense because pretty much everyone is going to want at least 7 values available, one for each week. But this only limits the cardinality options for fields created via the field UI. Fields can still be created programmatically with lower cardinality, so it would be better to limit the options independent of the UI. Ideally that could be done immediately before the field is saved, but field module doesn't seem to have a hook for that, so using hook_field_create_field() and hook_field_update_field() to update fields post-save might be the only option.

Comments

johnv’s picture

Category: Bug report » Feature request
johnv’s picture

Status: Active » Closed (outdated)

Given the life cycle of D7, this issue is considered closed. However, patches are appreciated.