how to custom actions on create record
how custom actions if the actions on create record, because im confuse after click the button actions then can generate pdf or something update data from im input on view create ?
Solution:Jump to solution
probably your repeater has a relationship.. if you want to access the repeater data in
$data
, you need to add ->dehydrated()
in the repeater18 Replies
functional its same like create, but i just want to update my data if i click this button, or just print my pdf from $this->record how to get $this->record with custom ?
$this->record
isn't available in the create action... I think you can use $get
$set
or $this->data
to access the form datathen how if the data its same like create function but just want to update data ?
like this on function ? can give me example sir ?
->action(function (array $data){...
?depends after click button will save ? like same with default create?
because this action in form action
like this form but i just custom actions then i will get the data from this after fill, then generate pdf for print
this will save if you call
$this->create()
methodinside action ?
yes, the default CreateAction calls
create()
ok but how to get data form then i want to generate pdf to print with this code like this maybe ?
$data
is an array with the form values..if click this will open modal right ?
this example is using form actions in your CreatePage
then how to access the data form $this->form->getState()
how?
$data['your_field']
?
check
yeah i think can already check. but i have data repeater then how to get this ? because already check my repeater not show
Solution
probably your repeater has a relationship.. if you want to access the repeater data in
$data
, you need to add ->dehydrated()
in the repeaterok i will try it
wait if the $this->form->getState() with create first then get data its possible ?
thanks for help me sir, already clear