getgrav / getgrav/grav-plugin-form
Switch toggle can't validate the subfield
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 64
- Forks
- 80
- Avg merge
- 10h 13m
- Merged PRs (30d)
- 9
Description
Hello,
When i want to toggle a textfield with a switch button, how can i validate the textfield by grav (php validation) ?
The fields configuration is as follows :
-
name: cellar
switch_name: has_cellar
label: Cellar
type: switchbox
checkbox_classes: form-control
text_input_classes: form-control surface
text_field_type: number
text_field_min: 0
text_field_max: 200
outerclasses : 'form_field form_field_step_2 col-6 col-lg-2'
placeholder: "Surface in m2"
Otherwise to toggle the textfield i needed to create an partial template.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests; start with the shown switchbox configuration and the Grav form-validation entry point. Reproduce validation for the numeric subfield when the switch is enabled and disabled. Done means the subfield validates without requiring a partial template.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100