CMS Development

Jsum
Key Advisor

Hubspot custom module form field title issue

SOLVE

I am using a form field in a custom module. There isn't a 'title' field for the form field, but I tacked a title onto the field widget in my code: 

{% form
    form_to_use="{{ module.form_field.form_id }}"
    response_response_type="{{ module.form_field.response_type }}"
    response_message="{{ module.form_field.message }}"
    response_redirect_id="{{ module.form_field.redirect_id }}"
    response_redirect_url="{{module.form_field.redirect_url}}"
    gotowebinar_webinar_key="{{ module.form_field.gotowebinar_webinar_key }}"
    title="test title"
%}

 

The markup that this widget outputs is going to include an <h3> in the code, empty or not, and this <h3> is going to have spacing that will need to be dealt with. I figured that there would be a title field available in the form editor or in the page editor, when choosing the form, but there isn't. I'm going to add an extra text field to my module and apply the value to the title attribute for the form field, and that will solve my issue, but it looks like this <h3> is a remnant from an older version of the cms. If I use a form tag or dnd module then it would have a title field, but the custom module form field does not provide this functionality. Is this correct?

2 Accepted solutions
Indra
Solution
Guide | Elite Partner
Guide | Elite Partner

Hubspot custom module form field title issue

SOLVE

@Hi @Jsum,

 

If you use the form field itself you can add a title like as mentioned inside the documentation for Hubl tags.

 

I've run a test myself and this worked for me:

{% form
  title="Sample title"
  no_title="false"
  form_to_use="{{ module.form.form_id }}"
  response_response_type="{{ module.form.response_type }}"
  response_message="{{ module.form.message }}"
  response_redirect_id="{{ module.form.redirect_id }}"
  response_redirect_url="{{module.form.redirect_url}}"
  gotowebinar_webinar_key="{{ module.form.gotowebinar_webinar_key }}"
%}

 

In the documentation it is telling you can remove the title by setting up no_title. So you would get this:

 

{% form
  no_title="true"
  form_to_use="{{ module.form.form_id }}"
  response_response_type="{{ module.form.response_type }}"
  response_message="{{ module.form.message }}"
  response_redirect_id="{{ module.form.redirect_id }}"
  response_redirect_url="{{module.form.redirect_url}}"
  gotowebinar_webinar_key="{{ module.form.gotowebinar_webinar_key }}"
%}

 


Vet Digital - The Growth Agency | HubSpot Solutions Partner Agency

Did my post solve your question? Help the community by marking it as a solution

View solution in original post

Jsum
Solution
Key Advisor

Hubspot custom module form field title issue

SOLVE

Thanks @Indra , "no_title" is a useful solution. I went with filling the "title" attribute with a text field, as the form would need a title anyway, in my case. 

{% form
    form_to_use="{{ module.form_field.form_id }}"
    response_response_type="{{ module.form_field.response_type }}"
    response_message="{{ module.form_field.message }}"
    response_redirect_id="{{ module.form_field.redirect_id }}"
    response_redirect_url="{{module.form_field.redirect_url}}"
    gotowebinar_webinar_key="{{ module.form_field.gotowebinar_webinar_key }}"
    title="{{ module.form_title }}"
%}

 

View solution in original post

4 Replies 4
webdew
Guide | Diamond Partner
Guide | Diamond Partner

Hubspot custom module form field title issue

SOLVE

Hi @Jsum ,

You can use custome module like : https://www.loom.com/share/62e609600b0c442baa53ed71a727fa48


{% form
form_to_use="{{ module.select_form.form_id }}"
response_response_type="{{ module.select_form.response_type }}"
response_message="{{ module.select_form.message }}"
response_redirect_id="{{ module.select_form.redirect_id }}"
response_redirect_url="{{module.select_form.redirect_url}}"
gotowebinar_webinar_key="{{ module.select_form.gotowebinar_webinar_key }}"
%}


Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards. 

0 Upvotes
Indra
Solution
Guide | Elite Partner
Guide | Elite Partner

Hubspot custom module form field title issue

SOLVE

@Hi @Jsum,

 

If you use the form field itself you can add a title like as mentioned inside the documentation for Hubl tags.

 

I've run a test myself and this worked for me:

{% form
  title="Sample title"
  no_title="false"
  form_to_use="{{ module.form.form_id }}"
  response_response_type="{{ module.form.response_type }}"
  response_message="{{ module.form.message }}"
  response_redirect_id="{{ module.form.redirect_id }}"
  response_redirect_url="{{module.form.redirect_url}}"
  gotowebinar_webinar_key="{{ module.form.gotowebinar_webinar_key }}"
%}

 

In the documentation it is telling you can remove the title by setting up no_title. So you would get this:

 

{% form
  no_title="true"
  form_to_use="{{ module.form.form_id }}"
  response_response_type="{{ module.form.response_type }}"
  response_message="{{ module.form.message }}"
  response_redirect_id="{{ module.form.redirect_id }}"
  response_redirect_url="{{module.form.redirect_url}}"
  gotowebinar_webinar_key="{{ module.form.gotowebinar_webinar_key }}"
%}

 


Vet Digital - The Growth Agency | HubSpot Solutions Partner Agency

Did my post solve your question? Help the community by marking it as a solution
Jsum
Solution
Key Advisor

Hubspot custom module form field title issue

SOLVE

Thanks @Indra , "no_title" is a useful solution. I went with filling the "title" attribute with a text field, as the form would need a title anyway, in my case. 

{% form
    form_to_use="{{ module.form_field.form_id }}"
    response_response_type="{{ module.form_field.response_type }}"
    response_message="{{ module.form_field.message }}"
    response_redirect_id="{{ module.form_field.redirect_id }}"
    response_redirect_url="{{module.form_field.redirect_url}}"
    gotowebinar_webinar_key="{{ module.form_field.gotowebinar_webinar_key }}"
    title="{{ module.form_title }}"
%}

 

Kevin-C
Recognized Expert | Partner
Recognized Expert | Partner

Hubspot custom module form field title issue

SOLVE

Hey @Jsum 

Pretty sure I've run in this before as well!

Kevin Cornett - Sr. Solutions Architect @ BridgeRev