feat: HEADING field type for registration forms — replace section property with structural field
Replace the per-field `section` text property with a dedicated HEADING field type that organizers add as a separate block for visual grouping. Also fixes duplicate heading bug on portal radio fields, replaces cramped VBtnToggle with VSelect for field width, and adds grouped field type dropdown with structure/input categories. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,8 @@ enum FieldDisplayWidth: string
|
||||
RegistrationFieldType::RADIO,
|
||||
RegistrationFieldType::CHECKBOX,
|
||||
RegistrationFieldType::MULTISELECT,
|
||||
RegistrationFieldType::TAG_PICKER => self::FULL,
|
||||
RegistrationFieldType::TAG_PICKER,
|
||||
RegistrationFieldType::HEADING => self::FULL,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ enum RegistrationFieldType: string
|
||||
case BOOLEAN = 'boolean';
|
||||
case NUMBER = 'number';
|
||||
case TAG_PICKER = 'tag_picker';
|
||||
case HEADING = 'heading';
|
||||
|
||||
public function isMultiValue(): bool
|
||||
{
|
||||
@@ -28,6 +29,11 @@ enum RegistrationFieldType: string
|
||||
|
||||
public function prohibitsOptions(): bool
|
||||
{
|
||||
return in_array($this, [self::TEXT, self::TEXTAREA, self::BOOLEAN, self::NUMBER, self::TAG_PICKER], true);
|
||||
return in_array($this, [self::TEXT, self::TEXTAREA, self::BOOLEAN, self::NUMBER, self::TAG_PICKER, self::HEADING], true);
|
||||
}
|
||||
|
||||
public function isStructural(): bool
|
||||
{
|
||||
return $this === self::HEADING;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user