CMS Development

mariana_pic
投稿者 | Platinum Partner
投稿者 | Platinum Partner

Javascript Forms Redirect URL not working on custom module.

解決

I've added a form to a custom module using the javascript embed code.

I need to do this because I want to use the callback function.

 

The problem I am having is that:

I am setting the forms to redirect to different URLs depending on the page my custom module is added. I'm selecting this setting in the left sidebar as usual.

But when I test and check the form details the redirect URL is not working. Its always showing the inline thank you message.

 

What can be going on here?

Is this a hubspot bug?



https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options

0 いいね!
1件の承認済みベストアンサー
alyssamwilie
解決策
名誉エキスパート | Elite Partner
名誉エキスパート | Elite Partner

Javascript Forms Redirect URL not working on custom module.

解決

@mariana_pic You need to remove inlineMessage from your form code. As stated in the documentation redirectUrl cannot be used with inlineMessage so it's likely inlineMessage is being given priority.

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

元の投稿で解決策を見る

4件の返信
mariana_pic
投稿者 | Platinum Partner
投稿者 | Platinum Partner

Javascript Forms Redirect URL not working on custom module.

解決

I had some back and forth with support because those redirects were not working and i think this is a hubspot bug.

“This particular hubl is expecting an actual URL to be present in the form editor. Since you have selected an internal page from the dropdown, it is instead returning a page ID, which is not populating the URL redirect. Normally with form modules, you use form tags, which the hubl appropriately handles to set the redirect based on the page ID returned, but since you are using a script embed from our form embed code, this option will not be available to you.”

What we did was add an external url in order to get that url redirect populated.

What happened here is that in those pages the RedirectID was still populating and it looks like that generates a conflict and after those redirects were added the workflows stopped working.

After lots of testing and trying things I realized that in the ones that the workflow was still triggering we did not have the RedirectID, and in the ones that were not working we still had it (even after changing the response back to inline message).

What I had to do is hardcode that RedirectID to be an empty string and add a callback function after the form is submitted to add the redirect.

0 いいね!
mariana_pic
投稿者 | Platinum Partner
投稿者 | Platinum Partner

Javascript Forms Redirect URL not working on custom module.

解決

Hello team!

@alyssamwilie thanks for the idea, but that did not work.
Support recommended to add the redirects as external links and that did the trick.

 

But it broke the workflows I had.

I undid all the changes in my english page, unset my redirects and the workflow are still not working.

They do work on the spanish version (where I did not change the redirect.)

So I'm starting to think that if you do any changes to your form (added with javascript) inside a custom module it won't trigger your workflows.

I'm trying to troubleshoot this with support but I'm not finiding a solution and its becoming very frustrating. 

So any help here can be useful.

0 いいね!
alyssamwilie
解決策
名誉エキスパート | Elite Partner
名誉エキスパート | Elite Partner

Javascript Forms Redirect URL not working on custom module.

解決

@mariana_pic You need to remove inlineMessage from your form code. As stated in the documentation redirectUrl cannot be used with inlineMessage so it's likely inlineMessage is being given priority.

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
Jaycee_Lewis
コミュニティーマネージャー
コミュニティーマネージャー

Javascript Forms Redirect URL not working on custom module.

解決

Hi @mariana_pic 👋 Let's see if we can get the conversation going. Hey, @Mark_Ryba @miljkovicmisa @FabianRichter do you have any experience with what @mariana_pic is describing? Or thoughts on how they can troubleshoot this one?

 

Thanks! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 いいね!