Dynamically disabling form field doesn't work?

Hi I'm look to dynamically disable a form field based on if the field is filled. Using the following snippet I expect the form field to be disabled after, but it doesn't do anything:
->disabled(function (Closure $get) {
if ($get('users')) {
return true;
} return false;
})
->disabled(function (Closure $get) {
if ($get('users')) {
return true;
} return false;
})
Am I doing something wrong? Edit The snippet does work on a "normal" TextInput but not on a MarkdownEditor. However, the same disabled() property should work.
2 Replies
awcodes
awcodes2y ago
Is the field a select and searchable?
TiBiBa
TiBiBaOP2y ago
Just made an edit. It's a MarkdownEditor input field Fixed by using a richEditor
Want results from more Discord servers?
Add your server