-
Goal: I want to be able to set the
Default value
of the Number Input and Switch components and have the defaults actually set to those values. -
Steps: Consulted forum and documents, inspected state, recreated the components in my forms, etc.
-
Details: I have two controls that are not honoring the
Default value
setting. My Number input is stuck on "0" when it renders and the Switch is stuck on "False" when it renders as well. -
Screenshots:
1 Like
Hey @lsnesn ,
You can try recreating the component after setting a default value. Alternatively, set the default value as a string enclosed in double quotes.
Another approach is to set default values dynamically using JavaScript.
If the issue persists, try performing a hard refresh with Ctrl + Shift + R.
5 Likes
Hi @lsnesn,
Did @WidleStudioLLP's solution work for you?
That is odd that the default value is not staying set to the value you hardcoded into it. Does it work if you delete and re-create the the component with the value put in?
My hunch was that something else is overriding the default
2 Likes
Hi @lsnesn,
Just wanted to follow up to see if you still had this issue or if you had more details to share!