#Disabled form elements getting submitted
11 messages · Page 1 of 1 (latest)
@bleak terrace can you please help me with this?
I do not understand how disabled state is related to form values
so, I have a scenario where when a switch component (which is a form field) is set to true then I want to disable all other form fields(elements). So when the form is submitted only the Switch component value should be submitted as all other form fields(elements) are already disabled
Then delete these values from the object that you’re sending to the backend
okay, is there a way to get what all values are set to disabled when the form is submitted?
You are probably better off either considering the second form stage you have as a separate form or implementing some filter function to only get the values you need.
To make this dynamic, it is required to understand which values need to be filtered. So, how can you get the values which are set to disabled so that they can be filtered?
Hey @bleak terrace and @swift tinsel, do you have any ideas on how can this be made dynamic?
How do you currently decide which components are disabled?