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:
You could probably pass a parameter to the function that creates your form schema
Jump to solution
7 Replies
Patrick Boivin
Patrick Boivin16mo ago
Are you sharing the form schema between a page and a modal?
Mark Chaney
Mark ChaneyOP16mo ago
Yes
awcodes
awcodes16mo ago
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.
Mark Chaney
Mark ChaneyOP16mo ago
Is there any way to detect if a form is in a modal? Like an instanceof or something?
awcodes
awcodes16mo ago
not that i'm aware of
Solution
Patrick Boivin
Patrick Boivin16mo ago
You could probably pass a parameter to the function that creates your form schema
Mark Chaney
Mark ChaneyOP16mo ago
Not sure why I didnt think of that. That would work
Want results from more Discord servers?
Add your server