Skip to content

RM-238: Add Radio Group and Checkbox Group components#80

Merged
BenHall-1 merged 4 commits intoTicketsBot-cloud:masterfrom
biast12:RM-238
Feb 15, 2026
Merged

RM-238: Add Radio Group and Checkbox Group components#80
BenHall-1 merged 4 commits intoTicketsBot-cloud:masterfrom
biast12:RM-238

Conversation

@biast12
Copy link
Copy Markdown
Contributor

@biast12 biast12 commented Jan 25, 2026

Extended backend and frontend logic to handle new input types: Radio Group (21) and Checkbox Group (22). Updated validation, option handling, and UI to treat these types similarly to String Select (type 3), including enforcing option requirements and managing min/max constraints. UI now displays appropriate labels and options sections for these new types.
BenHall-1
BenHall-1 previously approved these changes Feb 13, 2026
Introduce centralized input option validation and enforce min/max option counts across backend and UI.

Backend (app/http/endpoints/api/forms/updateinputs.go):
- Add validateInputOptions to encapsulate option checks and reuse validation for create/update paths.
- Enforce rules: Radio Group (type 21) requires 2–10 options, Checkbox Group (type 22) requires 1–10, and other option types require at least one option. Still validates uniqueness of option values.
- Replace duplicated validation logic with calls to validateInputOptions.

Frontend (frontend/src/components/manage/FormInputRow.svelte):
- Compute minOptionsRequired and maxOptionsAllowed based on type (Radio 2–10, Checkbox 1–10, String Select up to 25).
- Use these bounds in reactive validation, Add Option button gating, and user-facing validation messages to reflect exact limits.

These changes keep client and server validation consistent and reduce duplicated validation logic.
BenHall-1
BenHall-1 previously approved these changes Feb 13, 2026
Copy link
Copy Markdown
Member

@BenHall-1 BenHall-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@BenHall-1 BenHall-1 merged commit abe7bc9 into TicketsBot-cloud:master Feb 15, 2026
@biast12 biast12 deleted the RM-238 branch February 15, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants