Is there a way to make Select Field read only when creating/inputting data?

No description
No description
5 Replies
Kidasu X Stream
Kidasu X Stream3mo ago
my goal here is when user is inserting a new data, the user field doesn't have to be filled or changed. user only need to choose the invoice (tagihan) that hasn't been paid & upload the proof of payment image required
Davide Cariola
Davide Cariola3mo ago
If I understood correctly, you can use the disabledOn method. For example:
TextInput::make('landing_url')
->label(__('Landing'))
->live(debounce: 300)
->placeholder('https://')
->suffixIcon('heroicon-m-globe-alt')
->disabledOn('edit')
->required()
->url(),
TextInput::make('landing_url')
->label(__('Landing'))
->live(debounce: 300)
->placeholder('https://')
->suffixIcon('heroicon-m-globe-alt')
->disabledOn('edit')
->required()
->url(),
and as parameter you can use create or edit
Kidasu X Stream
Kidasu X Stream3mo ago
thanks for the heads up, i'll try it now hmmm, i kinda want that user field to be somekind of read only or maybe disabled, but the value of it can be inserted to the table (the value was taken from the user id). is there a way for that?
Davide Cariola
Davide Cariola3mo ago
Can you please rephrase the flow you're thinking of? I cannot picture it, sorry
Want results from more Discord servers?
Add your server