put 2 values in to one Textinput
Ello, i have the terms and categories. but i wanted to make a option avaible so you can set the full domain in once
So like terms '.' categories for example filament.com so it has the term and categorie but in one textinput
Solution:Jump to solution
Already fixed it with a other solution π I maked a extra string column and then in a other function seperated the string in to two variables and then worked my way
4 Replies
Do you mean like
->getDefaultState(fn(Get $get): string => $get('terms') . $get('categories'))
The problem there is that categories
in your example is a multiple()
Select, so I'm not sure what $get will return.
https://filamentphp.com/docs/3.x/forms/advanced#injecting-the-state-of-another-fieldYou can't give a closure to getDefaultState()
Okay, then explore the example for auto-generating a slug for a blog post title: https://filamentphp.com/docs/3.x/forms/advanced#generating-a-slug-from-a-title
Solution
Already fixed it with a other solution π I maked a extra string column and then in a other function seperated the string in to two variables and then worked my way