Execute a javascript function in response to a hubspot form

forms

#1

Hello everyone,

I created a page template that allows you to return a dynamic link via a javascript function.

I write a form in code and I execute a function called SaveToDisk, it works perfectly but in recent days it does not work anymore. Here is the integration code of the form:

    {% widget_block form "Formulaire_fiche_technique_fr" form_follow_ups_follow_up_type='', form_to_use='6f625bd2-2b82-4408-8a00-ea488f0e0172', title='', notifications_are_overridden=True, sfdc_campaign='', response_message='<script>SaveToDisk();</script>', response_response_type='inline',  overrideable=True  %}
            {% end_widget_block %}

I do not know if hubspot has changed the interpretation of the “response_message” parameter

Thanks for your help.
Cordially.


#2

Hi @Moadh_Agoubi,

The response_message parameter has never officially supported including script tags. The built-in form callback functions should be used instead: