<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Select field in HubL and show form or meeting module by selection in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/421632#M21949</link>
    <description>&lt;P&gt;Hello everyone&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a HubL Template where i need to show a form or a meeting based on a selection. Now my quesiton. Is it possible to add a select field by hubl and depending on what i chose in the select field, i show the meeting or the form field on the template (backend &amp;amp; frontend).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should look something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% selectfield with two values %}

{% if select = "form" %}
{% form "event-form" %}
{% else %}
{% module "meetings" path="@hubspot/meetings" %}
{% endif %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your help!&lt;/P&gt;</description>
    <pubDate>Wed, 24 Mar 2021 14:10:25 GMT</pubDate>
    <dc:creator>peesen</dc:creator>
    <dc:date>2021-03-24T14:10:25Z</dc:date>
    <item>
      <title>Select field in HubL and show form or meeting module by selection</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/421632#M21949</link>
      <description>&lt;P&gt;Hello everyone&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a HubL Template where i need to show a form or a meeting based on a selection. Now my quesiton. Is it possible to add a select field by hubl and depending on what i chose in the select field, i show the meeting or the form field on the template (backend &amp;amp; frontend).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should look something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% selectfield with two values %}

{% if select = "form" %}
{% form "event-form" %}
{% else %}
{% module "meetings" path="@hubspot/meetings" %}
{% endif %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 14:10:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/421632#M21949</guid>
      <dc:creator>peesen</dc:creator>
      <dc:date>2021-03-24T14:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Select field in HubL and show form or meeting module by selection</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/421805#M21962</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/128198"&gt;@peesen&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;Looks like you are moving in the correct direction.&amp;nbsp; &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt; is pretty good with this stuff and can probably help&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 18:51:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/421805#M21962</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-03-24T18:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Select field in HubL and show form or meeting module by selection</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/421839#M21965</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/128198"&gt;@peesen&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yes - it's possible and you're quite near the right solution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have two options(maybe more but those two come to my mind)&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;create a custom module with 3 things.
&lt;OL&gt;
&lt;LI&gt;select option(optional: display as radio buttons for a better user experience)&lt;/LI&gt;
&lt;LI&gt;form function&lt;/LI&gt;
&lt;LI&gt;meeting function&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;go the "export_to_template" way (nearly the same but personaly I would go the first one since it's a bit more flexible)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the first one the source code of the custom module should look like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% 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 %}&lt;/LI-CODE&gt;
&lt;P&gt;first - it's without any grid styling so if you'd like modify it with all of your custom classes&lt;/P&gt;
&lt;P&gt;second modify it to your namings/grouping. This code above is for this "layout"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2021-03-24 um 21.03.43.png" style="width: 326px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/39886i9FBA198207248CDF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bildschirmfoto 2021-03-24 um 21.03.43.png" alt="Bildschirmfoto 2021-03-24 um 21.03.43.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;if you group the elements, you'll need to change the code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the "export_to_template" way it's nearly the same (but as mentioned not as flexbile as the first way)&lt;/P&gt;
&lt;P&gt;The code should look like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;... 
YOUR Template
...

{% choice "form_style" label='Choose form styling', value='form', choices='form, meeting', no_wrapper=True, export_to_template_context=True %}
...
{% if widget.data.form_style == 'form'%}
{% module "form" path="@hubspot/form" %}
{% elif widget.data.form_style == 'meeting' %}
{% module "meetings" path="@hubspot/meetings" %}
{% endif %}
...
&lt;/LI-CODE&gt;
&lt;P&gt;If you want to go this way I recommend to place the {% choice %}-part right above the if-loop. By doing so it should be visible right above the form/meeting module in the content-tab of the particular page. Also consider that this solution works only for one form/meeting on one page. The first one works per module. So if you would place - let's say - 3 custom modules(first solution) right next to each other you could decide per module what should be displayed. If you use the second one you can control(without further modifications) the same 3 form/meeting modules. So you would have 3 forms or 3 meetings next to each other.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 20:16:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/421839#M21965</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2021-03-24T20:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Select field in HubL and show form or meeting module by selection</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/421967#M21976</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;Hello Anton, thank you so much for your help. I used the second option in my HubL-Template. I get the select field in the template and the possibility to select form or meeting but the if/else is not working and showing no content based on the selection. I also tried this a little minified:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% if widget.data.form_style == 'form'%}
&amp;lt;p&amp;gt;
  Das ist eine Form-Element
    &amp;lt;/p&amp;gt;
{% elif widget.data.form_style == 'meeting' %}
&amp;lt;p&amp;gt;
  Das ist ein MEeeting-Element
    &amp;lt;/p&amp;gt;
{% endif %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it something im doing wrong? Thank you so much for all your help!&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 08:44:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/421967#M21976</guid>
      <dc:creator>peesen</dc:creator>
      <dc:date>2021-03-25T08:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Select field in HubL and show form or meeting module by selection</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/422717#M22030</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/128198"&gt;@peesen&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sorry for the belated answer.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;change the code as following:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% if widget.data.form_style.value == 'form'%}
&amp;lt;p&amp;gt;
  Das ist eine Form-Element
    &amp;lt;/p&amp;gt;
{% elif widget.data.form_style.value == 'meeting' %}
&amp;lt;p&amp;gt;
  Das ist ein MEeeting-Element
    &amp;lt;/p&amp;gt;
{% endif %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 21:09:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/422717#M22030</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2021-03-26T21:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Select field in HubL and show form or meeting module by selection</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/423750#M22101</link>
      <description>&lt;P&gt;Hey Anton, i now could make the script work. It works with widget_data and not widget.data. But now i have another problem. Depending on the choice i load a form or a meeting element (module). But when i switch from form which is the default value to meeting. The meeting-module is not loading as expected. I cannot see the module in the content sidebar and when i click on it inside the editor i can not select a meeting. Is this even possible?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% choice "form_style" label='Select a Sidebar-Element', value='Form', choices='Form, Meeting', export_to_template_context=True %}
{% if widget_data.form_style.value == 'Form' %}
    {% form "event-form" %}
{% elif widget_data.form_style.value == 'Meeting' %}
    {% module "meetings" path="@hubspot/meetings" %}
{% endif %}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 31 Mar 2021 13:38:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/423750#M22101</guid>
      <dc:creator>peesen</dc:creator>
      <dc:date>2021-03-31T13:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Select field in HubL and show form or meeting module by selection</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/426834#M22372</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;Hey Anton, thank you so much for all your help so for. I posted the question above two weeks ago. Do you know if its possible to solve this problem or do i need to create two different template files (one for meeting and one for form) to give the user the opotunity to create the same view but one with the meeting module and one with the form module. Thank you so much and have a great day!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 13:13:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/426834#M22372</guid>
      <dc:creator>peesen</dc:creator>
      <dc:date>2021-04-12T13:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Select field in HubL and show form or meeting module by selection</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/427544#M22444</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/128198"&gt;@peesen&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you for the reminder. I wasn't around a PC for a few weeks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried this code in a few random templates and it works(outside of dnd_areas) for me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2021-04-13 um 22.42.14.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/40843iF595F8D23DE10954/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bildschirmfoto 2021-04-13 um 22.42.14.png" alt="Bildschirmfoto 2021-04-13 um 22.42.14.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you see this - no worries - hover this element(after a reload if this isn't visible or clickable) and select "edit module". This will open up the meeting settings in the left sidebar.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 20:57:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/427544#M22444</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2021-04-13T20:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Select field in HubL and show form or meeting module by selection</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/427653#M22454</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;,&amp;nbsp;thank you so much. Now i could finally make this work. Its as you said after you switch the choice field the form or meeting-module is not editable. You need to reload the page and then you can work with the module. This is not perfect but i will mention this workaround to the users. Thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 08:17:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Select-field-in-HubL-and-show-form-or-meeting-module-by/m-p/427653#M22454</guid>
      <dc:creator>peesen</dc:creator>
      <dc:date>2021-04-14T08:17:36Z</dc:date>
    </item>
  </channel>
</rss>

