How to - Prepopulate Forms on HubSpot

Case study

First choice employment single pages.

In the side form we have a selector :
What position are you applying?*

We wanted to populate that selector with all the open position and have the position you are visiting as pre selected.



What we did:

  • Create a form with an empty selector:

  • Load the form with Javascript in the employment-post.html template:


  • With the HubL function blog_recent_posts bring all the employment posts available
  • Loop the employment posts and populate the options in the selector.

  • Search for the option that is the same as the Title of the page you are visiting and mark it as selected in the selector.
  • DON'T FORGET TO dispatch an on change event in order to update this option.