Form related helpers #33
Unanswered
KevinBatdorf
asked this question in
Ideas
Replies: 1 comment
-
That's probably the easier way although it doesn't feel Alpine-ish (not declarative, we are setting values for x-models in a different point of the page). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not sure what actually would be useful, but there seems to be a demand for something to help users pre fill forms.
alpinejs/alpine#872
Personally, I can see when you have a complex form and the server handles the logic of pre filling some fields for you. It might not always be convenient to organize and pass in the fields to the Alpine component to initialize.
One option is something named
$formFieldModelFinder()
™ that will search for everyx-model
within a component, check if they have a value, see if the value matches the model, then override it or not depending on an option passed in (maybe it only gets overridden if falsey, for example). Any thoughts?I don't often worth with forms. Any other ideas what might be useful? Maybe something captcha related? Or pagination? Errors?
Beta Was this translation helpful? Give feedback.
All reactions