Adding a form to a Livewire component
this is the schema for the migration on my contact-us-messages
php artisan make:livewire-form CreateCm --generate
What is the model name? ❯ ContactMessages Which namespace would you like to create this in? Create ❯ 0 and was able to display the form @livewire('create-cm') the issue is when submitting messages via the form schema Forms\Components\Textarea::make('message') ->required() ->columnSpanFull(), even if i enter texts in the message part i am getting "The message field is required." i also tried using richtext and it also wouldn't work. hmmm no issue if changing it to TextInput
What is the model name? ❯ ContactMessages Which namespace would you like to create this in? Create ❯ 0 and was able to display the form @livewire('create-cm') the issue is when submitting messages via the form schema Forms\Components\Textarea::make('message') ->required() ->columnSpanFull(), even if i enter texts in the message part i am getting "The message field is required." i also tried using richtext and it also wouldn't work. hmmm no issue if changing it to TextInput

7 Replies
please check this section
This article can also help you
Filament
Form Builder - Common Errors to Avoid by Leandro Ferreira - Filament
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
My file after reading 5x, the documentation above, anxious if its a skill issue on my part 😅 😅
if i change Forms\Components\Textarea::make('message')
->required()
->columnSpanFull(),
to
Forms\Components\TextInput::make('message')
->required()
->maxLength(100),
i am able to submit and save...
hey, did you solve it?
okay i was able to solve it.
my thesis partner was using
in app.blade.php causing the "message" to not bind when using textarea when submitting.
you don't need to add this
I am guessing they haven't followed the docs and haven't add the js call