Auto populate form fields on a Anchor Tag button click
SOLVE
I have a button on a page that is not a CTA button. When a user clicks the button I have an anchor tag set to move the person down the page to fill out a form. This is working correctly as intended but I am also looking to see if I can also auto-populate one of the dropdown fields in the form with a predetermined selected record.
To be more clear I am looking for this to happen WITHOUT a page submission and WITHOUT using a query string. I just want the button to be clicked, the user moves down to the form, and the form field auto-populated on click.
Here on the page, you can see my three buttons on the pricing section.
As long as you keep the Select Lawn Care Program* selector that way it will work, otherwise you may need to update the script as well. Unfortunately, there is no other way I'm aware of in HubSpot. Adding custom IDs or classes to form fields would be ideal, but AFAIK that's not possible in HubSpot.
I hope this helps anyone who follows up on this post.
As long as you keep the Select Lawn Care Program* selector that way it will work, otherwise you may need to update the script as well. Unfortunately, there is no other way I'm aware of in HubSpot. Adding custom IDs or classes to form fields would be ideal, but AFAIK that's not possible in HubSpot.
I hope this helps anyone who follows up on this post.
Auto populate form fields on a Anchor Tag button click
SOLVE
Hi @Benjamin_Bachman, what exactly are you looking to have populate on the form? Which field should be populated after clicking, and what information should be included? This should be possible with JS/HubL combination but I'll just need more info