Hello everyone,
Hi, i have a problem adding a “Meeting” Element to a HubL-Theme. To create a form selection i use:
{% form "form" %}
How can i create the same but for a meeting-element?
Thank you so much for all your help.
Hello everyone,
Hi, i have a problem adding a “Meeting” Element to a HubL-Theme. To create a form selection i use:
{% form "form" %}
How can i create the same but for a meeting-element?
Thank you so much for all your help.
I’m going to assume you mean the meetings widget that pops up allowing people to book a time slot with individuals in your portal?
There is a `meetings` module provided in the root `@hubspot` folder which serves as a colleciton of base modules / examples. Exploring this folder … inside the meeting module we see the following source code:
{% if module.meeting %}
<div class="meetings-iframe-container" data-src="{{ module.meeting }}?embed=true"></div>
<script type="text/javascript" src="https://static.hsappstatic.net/MeetingsEmbed/ex/MeetingsEmbedCode.js"></script>
{% else %}
<div class="hs-meetings-placeholder">
<div class="hs-meetings-placeholder__inner">
<h3 class="hs-meetings-placeholder__title">{{ module.select_meeting_title }}</h3>
<p class="hs-meetings-placeholder__description">{{ module.select_meeting_description }}</p>
</div>
</div>
{% endif %}
Easier:
If you got to Sales > Meeting in the navigation (inside your portal) you’ll see the embed action on each meeting which will popup the following source code:
<!-- Start of Meetings Embed Script -->
<div class="meetings-iframe-container" data-src="https://meetings.hubspot.com/<identifier>?embed=true"></div>
<script type="text/javascript" src="https://static.hsappstatic.net/MeetingsEmbed/ex/MeetingsEmbedCode.js"></script>
<!-- End of Meetings Embed Script -->
Summarizing:
You just need to form the container with an identifier for the embed and add the script to render it Or, you can use the pre-built module that already handles this ![]()
Using the meeting module:
You can reference the HubSpot module as a snippet by selecting “select snippet” from the menu options which will provide the following:
{% module "<module identifier>" path="@hubspot/meetings", label="meetings.module" %}
Wherein you can provide the fields in the first code snippet. The meetings are selectable as a dropdown - automatically pulling in all available meeting in your portal from the pre-described location.
@Anton is this sufficent for you?
@NtbrownHello, thank you so much for your detailed answer. Im still a little bit confused. So i have a HubL-Theme. The embed function is not an option, it should really just copy the function of the meeting module in a “Drag & Drop Page”. How can i copy this behaviour with a Hubl-Code? I tried to use the meeting module HubL but this creates an Error in the Design-Manager “Syntax Error”. Thank you so much for your help and best regards. Pascal
Hi @peesen,
the easiest solution would be to create a custom module - this way you can a) reuse it anywhere b) customize it to your needs.
The functions you’ll need are all availible in the custom module options.
The bare minimum code should look like this:
{% if module.form_selector == 'meeting'%}
{{ module.meeting_field }}
{% elif module.form_selector == 'form' %}
{% form
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 }}"
%}
{% endif %}
Explenation:
With some basic styling it could look like this:
<div class="container">
<div class="row-fluid">
<div class="col-12">
{% if module.form_selector == 'meeting'%}
{{ module.meeting_field }}
{% elif module.form_selector == 'form' %}
{% form
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 }}"
%}
{% endif %}
</div>
</div>
</div>
it’s not really styled but you can add your personal classes and style it with CSS.
After you’ve created your custom module you can easily drop it into your template like this:
{% module "GENERATED MODULE NUMBER" path="PATH-TO-THE-MODULE", label="CUSTOM MODULE NAME", no_wrapper=True %}
to get this snippet just right-click on it and select “copy snippet”. Paste it anywhere you like in your template.
If you want to paste it into a drag&drop area(section/row/column) modify the snippet to this:
{% dnd_module "GENERATED MODULE NUMBER" path="PATH-TO-THE-MODULE", label="CUSTOM MODULE NAME", no_wrapper=True %}{% end_dnd_module %}
info: I’ve added “no_wrapper=True” to it since it will cut (unnecessary) wrpaping divs which you don’t really need. You can add this to every (dnd) module you like.
hope this helps,
best Anton
Depends what you mean by drag and drop. You mention themes so you could use a dnd_module with the path specified. Per the documentation these tags also can’t be direct children of a dnd_area so you’ll need to make sure your structure is correct.
But those should give you warning not syntax errors… whether attempting to include the module or dnd_module tag… On that note.
Unless you literally copied the <module identifier> as the text for the {% module %} tag… That was merely an abstract reference of syntax. It should be replaced by the actual identifier for the module. As described you could get that by copying the snippet.
Syntax error is vague. Can you post your code / what you’re doing exactly.
I tried a lot of things now and nothing works on my side. Now i just use a flexible content field and the user has to add the meetings field manually. Wen i try to use my own module with a meetings field the output ist just an url?
I really dont know what im doing wrong.
My current solution:
{% widget_container “flexible_content_meeting” %}
{% end_widget_container %}
Hi @peesen,
so first of all:
This is the code for meetings(forgot that last time)
{% module "meetings" path="@hubspot/meetings" %}
Can you please provide the code of your (custom) module and a seperate screenshot of the settings?
Like this:
<div class="container">
<div class="row-fluid">
<div class="col-12">
{% if module.form_selector == 'meeting'%}
{{ module.meeting_field }}
{% elif module.form_selector == 'form' %}
{% form
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 }}"
%}
{% endif %}
</div>
</div>
</div>
thank you
best,
Anton
Thank you so much! The code for the meeting module solves all my problems
Have a great day and thank you so much for all your help!