CMS Development

bartvintcent
Mitglied

Storing a form from custom module in a variable

Hi guys,

 

I'm trying to wrap my head around some forms stuff here. I've built a custom module in which I can select a form. In the code of the module, I can easily display the form.

 

Example:

{% form "testform" form_to_use="{{ row.formulier.form_id }}" response_response_type="{{ row.formulier.response_type }}" response_message="{{ row.formulier.message }}" response_redirect_id="{{ row.formulier.redirect_id }}" response_redirect_url="{{row.formulier.redirect_url}}"  %}

That will render the form on the page right at that point in the code. However, I'm trying to accomplish that this form is stored in a variable I can use at a later point in my code. Just like you would with text.

 

Is there a way to store this form with something like this?

{% set formvar = [the form code here...] %}

I checked out this thread by Craig, but it isn't really what I'm looking for:
https://community.hubspot.com/t5/CMS-Development/Display-form-via-Form-Selector-in-custom-module/m-p...

Hope you can help me out 🙂

0 Upvotes
2 Antworten
sharonlicari
Community-Manager/-in
Community-Manager/-in

Storing a form from custom module in a variable

Hey @bartvintcent 

 

Sorry for the delay response 🙂 

 

I am wondering if you still having this issue. If so, I am pretty sure our Community experts can share their knowledge with you. 

 

Hey @Anton , @Craig and @Kevin-C could you please share your expertise with @bartvintcent ?

 

Thank you

Sharon 


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




0 Upvotes
bartvintcent
Mitglied

Storing a form from custom module in a variable

Hi @sharonlicari ,

 

The issue is still here 🙂

However, we found another way and dismissed the option of adding a form to a custom module. But, still interested to learn if this is something that can be solved.

 

Thanks,
Bart

0 Upvotes