Can't set default value for form components on RichContentCustomBlock schema (RichEditor)
I'm trying to set a default value on a form component within the shema of a RichContentCustomBlock.
Example:
HeroBlock.php
PostForm.php
Maybe i'm doing something wrong, but i really can't seem to figure out what.
Edit:
https://github.com/rickzim/demo-filament-v4
GitHub
GitHub - rickzim/demo-filament-v4
Contribute to rickzim/demo-filament-v4 development by creating an account on GitHub.
6 Replies
Thanks! That does work 🙂
But is this how its supposed to be? Because i think when i use an action somewhere else in the application that it does seem to work with default()
I think if you add
formFill()
you can use default in the fields
Hmm if i do that, it will show the default values when editing the block instead of the ones i saved.
I think default will work when you don't have values in your form, like in the create mode
True, on create there are default values, but when you try to edit the block it will show you the default values instead of your input.
Added GitHub repo