Modals and columnSpan() for form fields
Thought i could just do ->columnSpan(['default' => 2, 'lg' => 1 ]), but no dice as those sizes arent based on the parent element. Is there an
Instance of
or something that I could use instead to set set the columnspan specifically for use in a modal.Solution:Jump to solution
You could probably pass a parameter to the function that creates your form schema
7 Replies
Are you sharing the form schema between a page and a modal?
Yes
Don’t apply the colspan until you use it.
Or wrap it in a group with the cols you want then control it width from the parent.
Is there any way to detect if a form is in a modal? Like an instanceof or something?
not that i'm aware of
Solution
You could probably pass a parameter to the function that creates your form schema
Not sure why I didnt think of that. That would work