Markdown data is not returned by $form->getData()
Anything else I need to configure? I'm confused
class NewListing extends Component implements HasForms
{
use InteractsWithForms;
public ?array $data = [];
public function render()
{
return view('livewire.new-listing')->layout('layouts.dashboard');
}
public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('title')->required()->autofocus(),
Textarea::make('description')->required(),
MarkdownEditor::make('instructions'),
Textarea::make('dwadaw')
])
->statePath('data');
}
public function create()
{
dd($this->form->getState());
}
}
class NewListing extends Component implements HasForms
{
use InteractsWithForms;
public ?array $data = [];
public function render()
{
return view('livewire.new-listing')->layout('layouts.dashboard');
}
public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('title')->required()->autofocus(),
Textarea::make('description')->required(),
MarkdownEditor::make('instructions'),
Textarea::make('dwadaw')
])
->statePath('data');
}
public function create()
{
dd($this->form->getState());
}
}
0 Replies