I'm interested I'm interested hbspt.forms.create({ region: "eu1", portalId: "143438306", formId: "5c77218a-4ec9-4b13-8af8-82f70c88c88f", onFormSubmitted: () => { trackForm(); $("#hs-form-header-wrapper").hide(); let topPos = $(".hs-form-wrapper").offset().top - 180; $('html, body').scrollTop(topPos); }, onFormReady: function($form, ctx){ $('input[name="weblead_type"]').val("Service request"); $('input[name="pagename"]').val("I'm interested"); $('input[name="page_url"]').val("https://www.cadac.com/be-en/request-service/"); $('input[name="campaign_code"]').val(""); $('input[name="marketing_list_number"]').val(""); $('input[name="generatedid"]').val("bf27dba6-da8e-491d-be00-b6e4ecf15f2b"); $('input[name="ddlcountry"]').val("us"); $('input[name="bu"]').val("CDC"); $('input[name="company"]').val(""); $('input[name="firstname"]').val(""); $('input[name="lastname"]').val(""); $('input[name="email"]').val(""); $('input[name="phone"]').val(""); if(!!$('input[name="trial_options"]').length){ $('input[name="trial_options"]').on('change', () => { const selectionValue = $('input[name="trial_options"]:checked').val().split('||'); $('input[name="marketing_list_number"]').val(selectionValue[0]); $('input[name="download_link"]').val(selectionValue[1]); let productName = $('input[name="trial_options"]:checked').parent().text(); $('input[name="download_object"]').val(productName); $('textarea[name="message"]').val(`Interesse in: ${productName}. Heeft de software al ontvangen (automatisch).`); }); } } });