This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

phplee
phplee

I have built a subscription plugin which has the option to attach an application form to it during the register process. However rather than me build a back end form building feature, i want to be able to simply assign a form from another plugin called 'Form Builder'. Now I've manage to do this part but not sure how i would render the form builder component in my subscription plugin.

So my question is how do i use the 'Form Builder' > Form component in my Subscription > Application component.

any help would be great...

thanks

Last updated

phplee
phplee

For anyone looking for the solution to my previous question. I managed to to load the component from another plugin into my component by doing this

$this->addComponent('Renatio\FormBuilder\Components\RenderForm', 'renderForm', ['formCode' => 'formIdCode'], true); 

then calling it in my partial:

{% component 'renderForm' %}
eskil
eskil

phplee said:

For anyone looking for the solution to my previous question. I managed to to load the component from another plugin into my component by doing this

$this->addComponent('Renatio\FormBuilder\Components\RenderForm', 'renderForm', ['formCode' => 'formIdCode'], true);

then calling it in my partial:

{% component 'renderForm' %}

Thank you, I was looking for exactly that! :)

Mohsin
Mohsin

Just make sure to write this code by overriding the component's init method so that the lifecycle of the component that is being depended on goes through as mentioned here.

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.