Show user different div depending on chosen radio/checkbox

SOLVE
Highlighted
New Contributor

Hi All,

 

I'm tackling an issue where I want to manage multiple content and products on one page. I do not want to show a wall of content, so the idea is to let the user decide which content user would like to see - using radio buttons or checkboxes.

 

Question: Can I show different content (multiple div) for the specific selection made by the user? For example, user selected option 1 (from 1 to 3) and I'm dynamically showing content a,b (from a,b,c,d,e), then, if the user changes to option 2, I'm showing content c.

 

Thanks for any tips!

 

Best \(^-^)/,

Adam

0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
Solution
Regular Advisor

Hi @AdamPokora , i have 3 ideas for this.

 

1) You can use tabs to control content. Look one example: https://ead.univali.br/bolsas-de-estudos-ead

 

If you need the code for tabs, i can sent to you my code.

 

2) You can create filters with HubDB. Look an example: https://ead.univali.br/cursos-graduacao

 

3) You can use too the smart content in rich text fields to show the content based on list, and in lists you can define with chosen radio/checkbox in form. But for this second option i believe need 2 pages. One to the form, and the second page with all contents in smart condition.

 

Did this post help solve your problem? If so, please mark it as a solution.

Best regards! 🙂

 

 

View solution in original post

2 Replies 2
Highlighted
HubSpot Employee

Hey @AdamPokora!

 

This is possible however there is no built-in feature in HubSpot that can do this, this would need to be custom coded into your website and will involve using javascript to make a div appear/hide on a button click. Here is an example resource that could help you get started with this.

Highlighted
Solution
Regular Advisor

Hi @AdamPokora , i have 3 ideas for this.

 

1) You can use tabs to control content. Look one example: https://ead.univali.br/bolsas-de-estudos-ead

 

If you need the code for tabs, i can sent to you my code.

 

2) You can create filters with HubDB. Look an example: https://ead.univali.br/cursos-graduacao

 

3) You can use too the smart content in rich text fields to show the content based on list, and in lists you can define with chosen radio/checkbox in form. But for this second option i believe need 2 pages. One to the form, and the second page with all contents in smart condition.

 

Did this post help solve your problem? If so, please mark it as a solution.

Best regards! 🙂

 

 

View solution in original post