How to get hidden values in getState()
Is it possible to get also the hidden input values when I use form->getState()? I use ->hidden(fn (Closure $get) to hide input fields, but need to use the values on submit.
7 Replies
Found a solution by my self, if needed to:
you can call getRawState() which geturns all fields, also hidden
Why would you hide a field when you need the value?
@Dennis Koch I use Hide to display options per User ID selected via Select
Still don’t understand why you need those values if they need to be hidden for that user
It's all about the overview, since there are no collapse options in the form and a separate form should not be created for each user, we use the ->Hidden(closure) to show and hide the settings per user. Maybe there is a another solution?
Still not sure why you need to store data, that's apparently not relevant. Sounds like you want to save defaults/fallback.
Instead of tabs or similar, the administrator should be able to make user settings and select the respective user via Select, after the selection appears the respective fields for the user. At the end save all user values accordingly.