<?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 Re: Creating hubl form with notifications override from HubDB entry in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-hubl-form-with-notifications-override-from-HubDB-entry/m-p/226154#M5050</link>
    <description>&lt;P&gt;To anyone who finds this and has a similar problem, I found a solution. While I cant seem to put hubl in the widget_attribute I can turn the whole thing into a token and place that inside the widget_block, like this;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;{% set email_attribute = '{% widget_attribute "notifications_override_email_addresses" is_json=True %}["'~ row.email ~'"]{% end_widget_attribute %}' %}
{% widget_block form row.hs_id, form_follow_ups_follow_up_type='', response_redirect_id=module.form_field.redirect_id, form_to_use='{{ module.form_field.form_id }}', title='{{ row.name }}', notifications_are_overridden=True, response_message='{{ module.form_field.message }}', response_response_type='{{ module.form_field.response_type }}', response_redirect_url='{{module.form_field.redirect_url}}', overrideable=True, label='Form', response={message='{ module.form_field.message }}', redirect_url='{{module.form_field.redirect_url}}'}  %}
      {{ email_attribute }}
{% end_widget_block %}&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 12 Dec 2018 20:09:34 GMT</pubDate>
    <dc:creator>Manobyte</dc:creator>
    <dc:date>2018-12-12T20:09:34Z</dc:date>
    <item>
      <title>Creating hubl form with notifications override from HubDB entry</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-hubl-form-with-notifications-override-from-HubDB-entry/m-p/226153#M5049</link>
      <description>&lt;P&gt;I created an employees page using HubDB and a custom module with a for loop to create the listing. The custom module has a field for the form but I customized it with the widget_block so I could edit the notifications_override_email_addresses. It is set up so that each employee gets a form and I would like it to email said employee when their form is filled out.&lt;/P&gt;
&lt;P&gt;Now, the code works just fine when I use a static email in it, but when I try to use the row.email it does not send the notification email. I did use the row.hs_id for the form id to make sure each form had a unique id, so it is pulling information from the  database into the forms creation. I also triple checked that row.email and its entry in the database where all spelled correctly. If anyone has some insight on this I would appreciate it. my code is below.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;{% widget_block form row.hs_id, form_follow_ups_follow_up_type='', response_redirect_id=module.form_field.redirect_id, form_to_use='{{ module.form_field.form_id }}', title='', notifications_are_overridden=True, sfdc_campaign='', response_message='{{ module.form_field.message }}', response_response_type='{{ module.form_field.response_type }}', response_redirect_url='{{module.form_field.redirect_url}}', overrideable=True, gotowebinar_webinar_key='', response_redirect_name='Homepage (http://www.hubspot.com/)', label='Form', response={message='{ module.form_field.message }}', redirect_url='{{module.form_field.redirect_url}}'}  %}

     {% widget_attribute "notifications_override_email_addresses" is_json=True %}["{{ row.email }}"]{% end_widget_attribute %}

{% end_widget_block %}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I would like to add that I also tried to remove the json=True and add only the email as suggested  in this post&lt;BR /&gt;
&lt;ASIDE class="quote quote-modified" data-post="2" data-topic="3461"&gt;
  &lt;/ASIDE&gt;&lt;/P&gt;&lt;DIV class="title"&gt;
    &lt;DIV class="quote-controls"&gt;&lt;/DIV&gt;
    &lt;IMG alt="" width="20" height="20" src="https://community.hubspot.com/user_avatar/integrate.hubspot.com/tim_joyce/40/1041_1.png" class="avatar" /&gt;
    &lt;A href="https://integrate.hubspot.com/t/using-hubl-variables-as-parameters-in-hubl-functions/3461/2"&gt;Using Hubl variables as parameters in hubl functions&lt;/A&gt; &lt;A class="badge-wrapper  bullet" href="https://community.hubspot.com/c/cos-content"&gt;&lt;SPAN class="badge-category-bg" style="background-color: #92278F;"&gt;&lt;/SPAN&gt;&lt;SPAN style="" data-drop-close="true" class="badge-category clear-badge" title="Questions about any of the COS APIs, including pages, blogs and blog posts, and templates.Have a design or HubL question? Check out our Designer Forums."&gt;COS/Content&lt;/SPAN&gt;&lt;/A&gt;
  &lt;/DIV&gt;
  &lt;BLOCKQUOTE&gt;
    A couple things: 


you shouldn’t set your widget_block inside the for loop… {% widget_block form "form_contact_reseau"... since the HUBL module will be attempting to set the same ID form_contact_reseau for each widget block which would be a duplicate. 


I just tested this code so it should work… if you remove is_json=“true” - you can just pass a string with comma separated values 


{% text "id_form" label='Id formulaire contact (1 pour chaque langue)', value='3f2b3ff8-693b-43b4-845c-b3b200908…
  &lt;/BLOCKQUOTE&gt;

&lt;BR /&gt;
but this did not work for me either, not even using a static email rather then a hubl token.&lt;P&gt;&lt;/P&gt;
&lt;H4&gt;Update:&lt;/H4&gt;
I also tried making a single form not in a loop but using a hubl token for the email which did not work either, it seems like hubl tokens dont work in the widget_attribute.
&lt;PRE&gt;&lt;CODE&gt;{% set send_email= 'email@email.com' %}
{% widget_block form 'fop', form_follow_ups_follow_up_type='', response_redirect_id=module.form_field.redirect_id, form_to_use='e75096de-a2f8-4683-bdc7-78368942be02', title='', notifications_are_overridden=True, response_message='thanks', overrideable=True, label='Form'}  %}
   {% widget_attribute "notifications_override_email_addresses" is_json=True %}["{{ send_email }}"]{% end_widget_attribute %}
{% end_widget_block %}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Dec 2018 14:46:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Creating-hubl-form-with-notifications-override-from-HubDB-entry/m-p/226153#M5049</guid>
      <dc:creator>Manobyte</dc:creator>
      <dc:date>2018-12-12T14:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating hubl form with notifications override from HubDB entry</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-hubl-form-with-notifications-override-from-HubDB-entry/m-p/226154#M5050</link>
      <description>&lt;P&gt;To anyone who finds this and has a similar problem, I found a solution. While I cant seem to put hubl in the widget_attribute I can turn the whole thing into a token and place that inside the widget_block, like this;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;{% set email_attribute = '{% widget_attribute "notifications_override_email_addresses" is_json=True %}["'~ row.email ~'"]{% end_widget_attribute %}' %}
{% widget_block form row.hs_id, form_follow_ups_follow_up_type='', response_redirect_id=module.form_field.redirect_id, form_to_use='{{ module.form_field.form_id }}', title='{{ row.name }}', notifications_are_overridden=True, response_message='{{ module.form_field.message }}', response_response_type='{{ module.form_field.response_type }}', response_redirect_url='{{module.form_field.redirect_url}}', overrideable=True, label='Form', response={message='{ module.form_field.message }}', redirect_url='{{module.form_field.redirect_url}}'}  %}
      {{ email_attribute }}
{% end_widget_block %}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Dec 2018 20:09:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Creating-hubl-form-with-notifications-override-from-HubDB-entry/m-p/226154#M5050</guid>
      <dc:creator>Manobyte</dc:creator>
      <dc:date>2018-12-12T20:09:34Z</dc:date>
    </item>
  </channel>
</rss>

