Using custom form inputs in a TwillBlockComponent
I'm trying to figure out how to add a custom form field inside a custom block. I have managed to get the vue component to render correctly, however it is not saving the input.
CustomBlock.php:
in
resources/views/admin/pages/form.blade.php
I've added:
resources/views/twill/partials/form/_text_area.blade.php
:
From what I can see the push to vuexStore never happens, my guess is that using BladePartial to add a form input is not the right way.
What am I missing, or what's the right way to achieve this?1 Reply
I managed to figure it out. Just had to create a class extending
BaseFormField
and another one extending TwillFormComponent
in order to be able to use the field in getForm()
. I followed the implementation for a basic input and got it to work.
However it appears that there is no need anymore to add any logic in the blade template to push to vuexStore. is that right?
_text_area.blade.php works just by having
and nothing else. when is additional logic to push to vuexStore needed? I would like to understand