-
Hi all, I need to use the Relation field as a field with a drop down list, but if there is no data in the drop down list, I need the data entered to be saved in the input field, not discarded if there is no selection from the model. I haven't found how to implement this yet, so I'm asking for help. Thanks! P.S. Here's an example of a field. And if there is no data, it resets it. use Orchid\Screen\Fields\Relation;
Relation::make('passportIssuer')
-> title('Place of passport issuance')
-> help('Enter the place where the passport was issued.')
-> fromModel(Issuer::class, 'name')
-> searchColumns('code'), |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
use Orchid\Screen\Fields\Select;
Select::make('passportIssuer')
->title('Place of passport issuance')
->allowAdd()
//... |
Beta Was this translation helpful? Give feedback.
-
bonjour mes devanciers svp je veux faire menu de catégoires et sous categoires mes catégories s'affichent |
Beta Was this translation helpful? Give feedback.
Relation
assumes a second model. For example, inSelect
you can add your own value like this: