Java not pulling through into a form using a custom module

Highlighted
New Contributor

I am trying to add a custom module with a form to a landing page but the form isn't displaying. 

The form is a custom module because the details from the form need to plug into a HR system, they have given me some Javascript to add to the page to display the form they need to capture the details they need. We don't need the contact details in HubSpot. I have put Javascript in the custom module and I can see it render correctly here in the preview: https://app.hubspot.com/design-previewer/534480/modules/25661916242 But it doesn't seem to pull through onto the page.

 

Any ideas? 

Reply
0 Upvotes
7 Replies 7
Highlighted
Esteemed Contributor | Elite Partner

Hi @kathrynellis ,

We don't have access to your portal so can't view the link you've provided. Would it be possible for you to link us to a preview of the page you've put the template on so we can try to determine why it's not showing?

Alyssa Wilie

Web Developer at LyntonWeb

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

Reply
0 Upvotes
New Contributor
Reply
0 Upvotes
Highlighted
Esteemed Contributor | Elite Partner

Weird, I can see the inrecruiting_form div on the page, but the script doesn't seem to be getting added for some reason. If you replace the script in the module with just 

 

$('#inrecruiting_form').html('Testing');

do you see 'Testing' added into the page?

Alyssa Wilie

Web Developer at LyntonWeb

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

Reply
0 Upvotes
Highlighted
Regular Advisor | Partner

@amwilie Yeah thats a weird one. using ".html("testing") or ".text(…" returns the object rather than modifying the dom.

Reply
0 Upvotes
Highlighted
Regular Contributor

Hi, 

 

Adding $('#inrecruiting_form').html('Testing'); did work and now testing is displayed on the page. 

Do you know what the problem is now?

 

Thanks

 

Matt

Reply
0 Upvotes
Highlighted
Esteemed Contributor | Elite Partner

Sorry, nope, just now know it's not an issue with the module itself. Maybe you could try putting the code into a .js file and adding it to the module as a linked file?

Alyssa Wilie

Web Developer at LyntonWeb

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

Reply
0 Upvotes
Highlighted
Top Contributor

we can't see that url you are sharing. if you are posting to a different url you can use AJAX to handle the POST/ response from their server on the landing page you are creating. 

If this post helped you resolve your issue, please consider marking it as the solution. Thank you for supporting our HubSpot community.
Reply
0 Upvotes