Edex
03/15/2023, 3:23 PMkalle
03/15/2023, 3:33 PMphp
public function getFormFields($object)
{
$fields = parent::getFormFields($object);
$fields = $this->getFormFieldsForRepeater($object, $fields, 'members', 'TeamMember', 'team-member');
return $fields;
}
You can always dd($fields) after getFormFieldsForRepeater, repeter fields for frontend will be there, so any additional data can be appended there.Edex
03/15/2023, 3:35 PMEdex
03/15/2023, 4:06 PMkalle
03/15/2023, 4:08 PMformData? You can also access form fields via $form_fields in the form view.Edex
03/15/2023, 4:08 PMkalle
03/15/2023, 4:10 PMEdex
03/15/2023, 4:12 PMEdex
03/15/2023, 4:12 PMEdex
03/15/2023, 4:12 PMkalle
03/15/2023, 4:15 PM$form_fields will not be present there, since that variable is available only in the /yourmodule/form.blade.php, you need to pass wanted data trough that @formField and it will be available in the component in which you are calling Vue component.kalle
03/15/2023, 4:15 PMEdex
03/15/2023, 4:16 PMkalle
03/15/2023, 4:21 PMphp
<x-twill::repeater
type="video"
:options="$sectors"
/>
And in the area17/twill/views/partials/form/utils/_blocks_templates.blade.php you can pass that $options to the Vue component.
But this error above tells me that you are editing vendor files directly, you should override that template file, not mess with the vendor files, since they will be overwritten on composer update action.Edex
03/15/2023, 4:28 PMkalle
03/15/2023, 4:42 PMEdex
03/15/2023, 6:35 PMEdex
03/15/2023, 6:36 PM