Custom resource page component data error.
I create a custom page for a simple resource.Inside the
.blade
of the page I added the line
then inside the page component i implemented the
getFormSchema()
method which has a radio and few text Inputs where one of the text inputs' visibility depends on the value of the radio as below
.The error i'm getting when i try to go the next step of the wizard is . I'm not sure how to go about this error.
.The error i'm getting when i try to go the next step of the wizard is . I'm not sure how to go about this error.
27 Replies
We need more information to help you debug your problem. Please click on the top left 'SHARE' button of the error page you're seeing and share the link with us.
Flare
No property found for validation: [type] - The error occurred at http://localhost:8000/manager/biodata
This like likely caused becasause you have not got the field as a public property on the component. I would suggest you put the form into a custom state like $data and manage it on an array basis for the form. see
https://filamentphp.com/docs/2.x/forms/getting-started#scoping-form-data-to-an-array-property
Filament
Getting started - Form Builder - Filament
The elegant TALL stack form builder for Laravel artisans.
This one really didn't work
Then provide a copy of your livewire component and view so we can review
A snip of the custom page.
then this is the coresponding blade file
Where is the mount method and the properties?
Tried them out but still got the same issue so i reverted the code to show you the original one.
check out this https://flareapp.io/share/W7zQRM2P#F54
Flare
Unable to set component data. Public property [$type] not found on component: [app.manager.resources.biodata-resource.pages.bioform] - The error occurred at http://localhost:8000/manager/biodata
add public $type;
Okay . which means i'll have to create a variable for each input?
nope.. you can use a single array:
https://filamentphp.com/docs/2.x/forms/getting-started#scoping-form-data-to-an-array-property
Filament
Getting started - Form Builder - Filament
The elegant TALL stack form builder for Laravel artisans.
This is what I've already explained @Leandro Ferreira
hey @lodeki ...
Yes .Let me try it again then i'll give the feedback.Thank you.
If you are using mount now then it'll be spot on
Okay .I'll give the feedback.
Hello managed the same .However got some issues with the wizard .It does not show the submit button on the last step.
and this is the .blade.
so you havent used ->submitAction()
check the wizard docs
Checked it out and added the submit button . However on click of the button , nothing happens .I would want to submit the data from the form and save it .
what code did you use for the button
this
and show me your code in the view that renders the form
This ..
you dont have a <form>
how does livewire know where to send the data to
please read the docs
My bad . Finally got the concept.Thank you.