Reusing a form using the form() function from a resource
Greetings, instead of having to have a function that returns an array with the components i.e.
getFormSchema()
, is it possible to add the form to an action just like in a relation manager as follows?
This is what I am currently doing
If I do the following, I will have to click the action twice in order for the info or form to display
Solution:Jump to solution
Just create a method that returns the array of form components then call that method anywhere you need to use the form schema. I think you might be doubling up the form initialization.
3 Replies
Bumping this
Solution
Just create a method that returns the array of form components then call that method anywhere you need to use the form schema. I think you might be doubling up the form initialization.
That's what I am doing right now, I was just hoping there was a similar approach to Relation Managers, thanks tho