Hi,
I’m having some trouble getting landing page to create with a form module inside it.
Before the Design Manager change to widgets / modules I used to pass the id of the Form using form_to_use. This doesn’t seem to work anymore.
I can still create the Form, get the Id and then create the Landing Page, but the Form is not linked to the page.
The template block for the Form used to look like this:-
{% widget_block form “module_1520509818427313”, form_follow_ups_follow_up_type=‘’, form_to_use=‘d0021d42-79bf-4e91-9d96-127ce50806fd’, gotowebinar_webinar_key=‘’, notifications_are_overridden=False, overrideable=True, per_widget_wrapper_html=‘’, response_message=‘Thanks for submitting the form.’, response_redirect_url=‘’, response_response_type=‘redirect’, sfdc_campaign=‘’, title=‘’, wrapping_html=‘<div id=“workcast-event-form”>{{ html }}</div>’, label=‘Form’ %}
{% widget_attribute “notifications_override_email_addresses” is_json=True %}[]{% end_widget_attribute %}
{% end_widget_block %}
But in the new Design Manager it look like this:-
{% module_block module “module_1549553234621780” wrapping_html=‘<div id=“workcast-event-form”>{{ html }}</div>’, per_widget_wrapper_html=‘’, overrideable=True, widget_name=‘Form’, module_id=1155238, label=‘Form’ %}
{% module_attribute “form” is_json=True %}{“response_type”:“redirect”,“message”:“Thanks for submitting the form.”}{% end_module_attribute %}
{% end_module_block %}
so a Form is now a Module rather than a Widget.
I am passing the following JSON to the https://api.hubapi.com/content/api/v2/pages endpoint:-
{
“name”: “cjs201 Registration Landing Page”,
“html_title”: “cjs201 Registration Landing Page”,
“meta_description”: “cjs201 Registration Landing Page”,
“template_path”: “generated_layouts/7354513786.html”,
“campaign_name”: “cjs201”,
“publish_date”: 1549623024353.2068,
“publish_immediately”: “true”,
“subcategory”: “landing_page”,
“is_draft”: false,
“slug”: “cjs201-registration”,
“widgets”: {
“module_144646050862912567”: {
“body”: {
“value”: “cjs201”
}
},
“module_1520940079431362”: {
“body”: {
“value”: “18 February 2019”
}
},
“module_15495568009901036”: {
“body”: {
“notifications_override_guid_buffer”: “”,
“notifications_override_email_addresses”: null,
“response_redirect_url_label”: “Contact Us”,
“form_to_use”: “2c806b14-c11f-4be8-ada8-9cc6a266c157”,
“title”: “”,
“form_to_use_label”: “I added this”,
“notifications_are_overridden”: false,
“sfdc_campaign”: “”,
“notifications_override_guid”: “”,
“response_response_type”: “redirect”,
“response_message”: “Thank you for submitting the form.”,
“form_follow_ups_workflow_id”: “”,
“form_follow_ups_follow_up_type”: “”,
“sfdc_campaign_label”: “”,
“form_follow_ups_workflow_label”: “”,
“response_redirect_url”: “http://www.bbc.co.uk”
}
}
}
}
Do I need to change any of the above JSON to get the form to attach in the new version of the module?
Thanks