CMS Development

wadefitzgerald
Participant

Forms adding in Template vs Forms Created in a Module - Missing Parameters

SOLVE

I built a custom form using a coded module - but the extra parameters aren't in my form - but they are in the default forms - so just looking as to how to code that in so the end user can avail of these extra functions like "Send Form notifications to specified email address instaed of the default", "Add to workflow" and "Send a follow-up email".  I added in the custom code that seems like it would do the trick, but nothing changed in functionality.  

 

Here is the code I am using in the Module:

{% form
form_to_use="{{ module.form_field2.form_id }}"
response_response_type="{{ module.form_field2.response_type }}"
response_message="{{ module.form_field2.message }}"
response_redirect_id="{{ module.form_field2.redirect_id }}"
response_redirect_url="{{module.form_field2.redirect_url}}"
gotowebinar_webinar_key="{{ module.form_field2.gotowebinar_webinar_key }}"
follow_up_type_simple="{{ module.form_field2.follow_up_type_simple }}"
simple_email_for_live_id="{{ module.form_field2.simple_email_for_live_id }}"
follow_up_type_automation="{{ module.form_field2.follow_up_type_automation }}"
form_follow_ups_workflow_id="{{ module.form_field2.form_follow_ups_workflow_id }}"
notifications_are_overridden="{{ module.form_field2.notifications_are_overridden }}"
notifications_override_email_addresses="{{ module.form_field2.notifications_override_email_addresses }}"
sfdc_campaign="{{ module.form_field2.sfdc_campaign }}"
%}hubspot-form-question.jpg

0 Upvotes
1 Accepted solution
wadefitzgerald
Solution
Participant

Forms adding in Template vs Forms Created in a Module - Missing Parameters

SOLVE

Hi Stephanie,

   I got it working now using the module.follow_up_type_simple and module.simple_email_for_live_id.  I think the issue was I was trying to send an email from an old workflow that wasn't working correctly.  So I double checked everything and got an active workflow I know was working correctly - and used that one and it worked. So I don't think the issue was with the code, moreso with the email I was trying send. Thanks for your help with this matter.  

View solution in original post

0 Upvotes
5 Replies 5
wadefitzgerald
Participant

Forms adding in Template vs Forms Created in a Module - Missing Parameters

SOLVE

Added in the parameters to the form so you can see it in the front end now- however, nothing works.  The default parameters they set in the form module and the ones they show on the website at this page ... https://designers.hubspot.com/how-to-create-a-form-module-in-a-custom-module  - doesn't match up - something seems wrong in the documenation.  Does anyone have a custom form working with the parameters for Send a followup email and the choice of which one?  Thanks!

0 Upvotes
Stephanie-OG
Key Advisor

Forms adding in Template vs Forms Created in a Module - Missing Parameters

SOLVE

Hi Wade, 

 

It looks like you're using the form field that appears in the custom module sidebar (your module.form_field2). The form field only has those four basic options (A form selector dropdown, A post-submit action radio select, A thank you message field and A form placeholder), as listed in the article. The form module, which you can use outside of custom modules (in coded templates or partials), does have those extra options.

 

However, following the instrucitons on the article, you can add in the extra parameters and create your own custom fields for the remaining options. For example, I can create a Boolean field called "Follow up?" with the variable name "my_custom_follow_up_boolean" and add that to my module like this: 

 

form-fields.jpg

 

The variable names you add in the HTML + HubL will have to match the variable names of the fields you've added on the right-hand side. 

 

I hope that helps!

 


Stephanie O'Gay Garcia

HubSpot CMS Design & Development

Website | Contact

 

If this helped, please mark it as the solution to your question, thanks!

wadefitzgerald
Solution
Participant

Forms adding in Template vs Forms Created in a Module - Missing Parameters

SOLVE

Hi Stephanie,

   I got it working now using the module.follow_up_type_simple and module.simple_email_for_live_id.  I think the issue was I was trying to send an email from an old workflow that wasn't working correctly.  So I double checked everything and got an active workflow I know was working correctly - and used that one and it worked. So I don't think the issue was with the code, moreso with the email I was trying send. Thanks for your help with this matter.  

0 Upvotes
wadefitzgerald
Participant

Forms adding in Template vs Forms Created in a Module - Missing Parameters

SOLVE

Hi - Yes, I did that but it doesn't function.  The controls show up in the front end so you can choose the yes/no and the email - but it doesn't actually do anything. I tried using both the module.parameter and module.form_field2.parameter - but neither works. Do you have any other suggestions?

 

Can you provide a working example that I can view and see the code – something isn’t right with this documentation regarding these extra fields.  Thank you.

 

0 Upvotes
Stephanie-OG
Key Advisor

Forms adding in Template vs Forms Created in a Module - Missing Parameters

SOLVE

Could you send me over a screenshot of your module to take a look at the fields and copy your code here so that I can check it out?

 

Thanks

 


Stephanie O'Gay Garcia

HubSpot CMS Design & Development

Website | Contact

0 Upvotes