Created By:
Show Full Video Translation
Hi everyone. Thank you for tuning in. In this video, I would like to demonstrate a really cool functionality that Jka built inside hotspot by using a custom module, some final vanilla Jeff script and a hotspot forum. And this functionality is a multiple choice quiz. And quiz is going to allow you to retrieve data from your visitors in an interactive way. And by storing the answers in a hotspot form, you also have all the data available in your crm. Now, as bonus, we added a small additional functionality that is going to allow you to redirect the nstitute to a different thank you page depending on the answers that are being given. So that is really cool. Let's take a quick look at the quiz itself. So what we see here, right here is the quiz, and I'll quickly go through all the questions to show you how the module itself is working.
And after that I'll start showing the code. Of course, um, we have a button to start the quiz and once we clicked on that button, we get the first question. Now this is a really hard question for most of my US based trends, um, but my advice is give the little French twist and you should be fine. Um, when we are giving an answer, we'll see the next question straight away, but we do have the option to go back to the previous question and change the answer. And no matter how often we change the answer, the information will always be stored in the form that is in the last step. So if we give all answers in this specific quiz will be shown a form at the end. And this is going to allow us to, uh, store our contact details and submit the hotspot form because this little form that we see right here is a default hotspot form with a few custom properties to store the answers of the previous questions.
As you see right now, you see that all the answers that I've given in the quiz are stored in these properties, but I still have the option to go back. And if I give a few different answers, you'll see that the values in this form are updated as well. Now if I submit this form, depending on the answer that is given, I'll be shown a different thank you page. Um, and in this case, the last question is going to determine the thank you page that is being shown. So if my script is working correctly and I submit this forum, I should be redirected to a different page. So this is really nice. Now let's take a quick look at the module itself. So the module consists of a few different fields that, um, is going to allow you to configure this specific module. We have some default settings
To determine the label of the buttons. We have the option to set the content of the first slide, and then we have the questions itself and we have the option to set a subtitle, the question of course. And we also have the option to set the internal name of the contact property where we want to store the answer in. Then we have the option to give or set the answers for each question. And you can set as many answers as you want per question. Um, and this is going to be a pretty important setting because the value has to match the value of the property being used in the form. Now, if we want to store this information in a single line text, this isn't going to be a problem. But if you're using a dropdown select or multiple check boxes, then the value of each answer has to match the value of an option in your property.
Now you'll see that we also have the option to set a thank you page euro, and this option is available per answer. So in my questions, I can determine the thank you page depending on the answer being given. Um, so this are all, these are all the options that we have available in this specific module, but we also have the content for the last slide. Now you'll see that we have a little rich text editor to show a thank you message for participating in this specific quiz. And we have the option to select a HubSpot form, and this is the form that's being used to store all the information from the quiz in. Now let's take a quick look at the goat. Um, what we see here is the module HDL of this specific module. Uh, we have the section where we're showing the first step of the quiz, um, and that is going to allow you to start the quiz and we have a little cloth name that we're using in the JavaScript file to allow the user to start quiz.
And next we have a little four loop that is going to loop through all the slides that we have set in our module. Um, you'll see that we have the subtitle, we have the question available right here, and then we have a second for loop where we're looping through all the different questions. Um, now you'll see that we use data attributes to store the information that we want to use in our Jeffs script file. We're giving it a property, we're passing it a property, so the property of the field in a hotspot form where we want to store the information in. We are passing at the value of this specific answer, and we have the option to pass a different page, a different thank you page if this specific answer is given. And I'll show you how this works in a second. Um, then we have a little progress bar, which isn't that important, and we have the navigation, which is going to allow the user to go to next question or the previous question.
Now you'll see that at the last part of this module we'll have a default HubSpot form and the form can be selected through the module. Um, and this is the form where we're going to store the information. Now if we take a look at the quiz, you'll see that we're first retrieving the fair slide. Then we're going to retrieve all the other slides that are set through the repeater fuels, and then we're retrieving the form from the last slide. Now we have some default functionality to allow the user to navigate through each slide. Um, but the more most important part of this specific rift script is the event listener that is set on each answer that can be given at a specific question. So in our module html, we are not using, uh, any form elements like a radio button or a uh, uh, input field, but we're simply creating a diff with some styling to make it look like a radio button.
And whenever someone is clicking on an answer, we are going to retrieve the property, the value and the link for the thank you page if this is set for that specific answer. Um, and we're going to retrieve all the inputs with a matching property name from the hotspot forum. So this is going to allow you to store the, the information in a single line text or maybe a select property or whatever you want to be honest. Now, if a link is set for this specific answer being given, we are going to store the link in a uh, parameter called redirect two, um, and then we have the most important part of the script, and that is the part where we're going to store the information in the hotspot form. Now, if you want to store information in a HubSpot form, it is not sufficient to simply update the value of the input, but you also have to let the HubSpot form know that the value has changed.
And this is a really important part because if you do not add this in your JavaScript, then it might happen that the information set in the HubSpot form through JavaScript isn't stored correctly. So won't be shown in the form submission or in your crm, but you can make sure that the information is stored in the HubSpot form correctly by dispatching an event on the input. Um, and this is going to let the HubSpot form know that a new value is present. Now, at the end of the script, we have a event listener on the window and we're going to listen for a message event. And whenever a message event is triggered by whatever, um, we're going to check if it's a event sent by a hotspot form. And if that's the case and the event name is on form submitted, that is going to let us know that a form is submitted.
Make sense? Right? Um, we are going to redirect the user to the redirect two link that we stored here. So if someone is going to give an answer that has a thank you page link set in the module, we are going to redirect user to that link instead. So this is a really cool part of this specific script. Now, there are a lot of ways that you can build custom form behavior and HubSpot. You can build a custom HDML form and not use a HubSpot form at all. But in that case, you'll have to use the Form's mission API to store your information. But that's quite easy to use, to be honest. Or you can choose to, uh, create a script like I did and store the information in a HubSpot form directly by using f vanilla Jeffs script. Now, if you want to learn more about old cool stuff that you can do in hotspot in the CMS or crm, make sure to follow me or Bright Digital. Have a great.
And after that I'll start showing the code. Of course, um, we have a button to start the quiz and once we clicked on that button, we get the first question. Now this is a really hard question for most of my US based trends, um, but my advice is give the little French twist and you should be fine. Um, when we are giving an answer, we'll see the next question straight away, but we do have the option to go back to the previous question and change the answer. And no matter how often we change the answer, the information will always be stored in the form that is in the last step. So if we give all answers in this specific quiz will be shown a form at the end. And this is going to allow us to, uh, store our contact details and submit the hotspot form because this little form that we see right here is a default hotspot form with a few custom properties to store the answers of the previous questions.
As you see right now, you see that all the answers that I've given in the quiz are stored in these properties, but I still have the option to go back. And if I give a few different answers, you'll see that the values in this form are updated as well. Now if I submit this form, depending on the answer that is given, I'll be shown a different thank you page. Um, and in this case, the last question is going to determine the thank you page that is being shown. So if my script is working correctly and I submit this forum, I should be redirected to a different page. So this is really nice. Now let's take a quick look at the module itself. So the module consists of a few different fields that, um, is going to allow you to configure this specific module. We have some default settings
To determine the label of the buttons. We have the option to set the content of the first slide, and then we have the questions itself and we have the option to set a subtitle, the question of course. And we also have the option to set the internal name of the contact property where we want to store the answer in. Then we have the option to give or set the answers for each question. And you can set as many answers as you want per question. Um, and this is going to be a pretty important setting because the value has to match the value of the property being used in the form. Now, if we want to store this information in a single line text, this isn't going to be a problem. But if you're using a dropdown select or multiple check boxes, then the value of each answer has to match the value of an option in your property.
Now you'll see that we also have the option to set a thank you page euro, and this option is available per answer. So in my questions, I can determine the thank you page depending on the answer being given. Um, so this are all, these are all the options that we have available in this specific module, but we also have the content for the last slide. Now you'll see that we have a little rich text editor to show a thank you message for participating in this specific quiz. And we have the option to select a HubSpot form, and this is the form that's being used to store all the information from the quiz in. Now let's take a quick look at the goat. Um, what we see here is the module HDL of this specific module. Uh, we have the section where we're showing the first step of the quiz, um, and that is going to allow you to start the quiz and we have a little cloth name that we're using in the JavaScript file to allow the user to start quiz.
And next we have a little four loop that is going to loop through all the slides that we have set in our module. Um, you'll see that we have the subtitle, we have the question available right here, and then we have a second for loop where we're looping through all the different questions. Um, now you'll see that we use data attributes to store the information that we want to use in our Jeffs script file. We're giving it a property, we're passing it a property, so the property of the field in a hotspot form where we want to store the information in. We are passing at the value of this specific answer, and we have the option to pass a different page, a different thank you page if this specific answer is given. And I'll show you how this works in a second. Um, then we have a little progress bar, which isn't that important, and we have the navigation, which is going to allow the user to go to next question or the previous question.
Now you'll see that at the last part of this module we'll have a default HubSpot form and the form can be selected through the module. Um, and this is the form where we're going to store the information. Now if we take a look at the quiz, you'll see that we're first retrieving the fair slide. Then we're going to retrieve all the other slides that are set through the repeater fuels, and then we're retrieving the form from the last slide. Now we have some default functionality to allow the user to navigate through each slide. Um, but the more most important part of this specific rift script is the event listener that is set on each answer that can be given at a specific question. So in our module html, we are not using, uh, any form elements like a radio button or a uh, uh, input field, but we're simply creating a diff with some styling to make it look like a radio button.
And whenever someone is clicking on an answer, we are going to retrieve the property, the value and the link for the thank you page if this is set for that specific answer. Um, and we're going to retrieve all the inputs with a matching property name from the hotspot forum. So this is going to allow you to store the, the information in a single line text or maybe a select property or whatever you want to be honest. Now, if a link is set for this specific answer being given, we are going to store the link in a uh, parameter called redirect two, um, and then we have the most important part of the script, and that is the part where we're going to store the information in the hotspot form. Now, if you want to store information in a HubSpot form, it is not sufficient to simply update the value of the input, but you also have to let the HubSpot form know that the value has changed.
And this is a really important part because if you do not add this in your JavaScript, then it might happen that the information set in the HubSpot form through JavaScript isn't stored correctly. So won't be shown in the form submission or in your crm, but you can make sure that the information is stored in the HubSpot form correctly by dispatching an event on the input. Um, and this is going to let the HubSpot form know that a new value is present. Now, at the end of the script, we have a event listener on the window and we're going to listen for a message event. And whenever a message event is triggered by whatever, um, we're going to check if it's a event sent by a hotspot form. And if that's the case and the event name is on form submitted, that is going to let us know that a form is submitted.
Make sense? Right? Um, we are going to redirect the user to the redirect two link that we stored here. So if someone is going to give an answer that has a thank you page link set in the module, we are going to redirect user to that link instead. So this is a really cool part of this specific script. Now, there are a lot of ways that you can build custom form behavior and HubSpot. You can build a custom HDML form and not use a HubSpot form at all. But in that case, you'll have to use the Form's mission API to store your information. But that's quite easy to use, to be honest. Or you can choose to, uh, create a script like I did and store the information in a HubSpot form directly by using f vanilla Jeffs script. Now, if you want to learn more about old cool stuff that you can do in hotspot in the CMS or crm, make sure to follow me or Bright Digital. Have a great.
π Multiple-choice quiz inside HubSpot
In this video, I'll show you how you can build a multiple-choice quiz inside with a custom module and some Vanilla .
There are multiple ways you can build custom forms inside HubSpot;
β
You can build a custom form with HTML or something like React and store the data in HubSpot using the Form Submission API
β
Or you can create a custom form with HTML and store the information directly in an embedded HubSpot form
In this video, I went with the last option, and as a bonus, I added functionality that will redirect the user to a different thank you page depending on the answer given.
If you need custom elements in your HubSpot CMS website, make sure to reach out to
More Builds Like This One
Video: Sales Pipeline Prep for 2023 Part 2
By: Amber Mizelle
π
It's the most wonderful time of the yearπ Prepping for your 2023 HubSpot forecast Part 2! Last week I shared some tips for how to st.
Video: Zapier and OpenAI
By: Ryan Gunn
Now that Zapier is integrated with OpenAI, it opens up a smorgasbord of new possible #hubspottipsandtricks! Here's something I was messi.
Video: Review Company Data Quarterly
By: Ryan Gunn
Do you look at your most important clients on a quarterly basis to see how business is going? You should. Unfortunately, Hubspot doesn't.
Video: A/B test an email in workflows
By: Ryan Gunn
You can easily A/B test an email to try out different subject lines or design elements. But what about testing send cadence of an email .
Video: Use Custom Objects to Surface Contact Info
By: Ryan Gunn
Hubpot's Custom Object tool has limitless use-cases, but one way you can use it is to save your sales team some clicks by surfacing impo.
Video: Use tickets to manage invoicing
By: Amber Mizelle
HubSpot users - How does your Accounting team know when a sales rep just moved a deal to Closed Won and they need to review it for invoi.
Video: Best practices to manage deal close dates
By: Amber Mizelle
Are the deal close dates a mess in your pipeline(s)? Are they inaccurate or has the close date passed, but the deal is still open? HubSp.
Video: Sales Pipeline Prep for 2023 Part 1
By: Amber Mizelle
It's the most wonderful time of the year π β It's time to fill out your HubSpot sales goals and forecasting metrics for 2023 and update.
Video: Chatgpt is Coming
By: Connor Jeffers
#Chatgpt may not take all of our jobs, but its definitely coming after Max Cohen π§π» and Robert Jones. Memes are what it does best.
Video: Remove Properties from Views
By: Amber Mizelle
If you've ever tried to archive a property from a HubSpot portal, you know that you have to remove it from use before it can be archived.
Video: Managing Customer Lifecycle with Multiple Sales
By: Amber Mizelle
Not all B2B companies sell 1 solution or only sell to their clients once, so one of the biggest issues that my B2B clients run into in H.
Video: Calendar View for Scheduling Meetings
By: Kyle Jepson
There's now a calendar view when you schedule meetings inside the CRM. #HubSpotTipsAndTricks
video: Build a Lead Routing Workflow
By: Carsten Brendel
Are you responsible for sales or are you the managing director? Then hopefully you're already using lead routing. If not, here are the e.
video: Why You Should Document Your Builds
ππ»ββοΈ Remember to create naming conventions, descriptions and documentation, kids! Inspired by βs super version of this super meme:
video: Sequence Builder Glow Up
Guess who got a glow-up to start the new year π
πΌ The HubSpot Sequence Builder 𧑠Well, the updates to the interface actually happened .
Video: Export the Full History of a Contact
You can now export the full history of individual contacts #HubSpotTipsAndTricks #HubSpot #CRM
video: Using the Record Overview Tab
By: Moustafa M.
This NEW (somewhat hidden) Hubspot feature can save your team TONS of hours. In our latest #hubspot_powertip we dive into overviews whic.
video: Access Your Marketing Email Analytics in the Custom Report Builder
You can now access your marketing email analytics in the custom report builder! (Also, a surprise shoutout to my friends in #Australia) .
Video: Migrating Blogs with Dynamic Pages
By: Teun Rutten
π Migrating multiple HubSpot Blogs to HubDB with dynamic pages In this video, I'm going to showcase a website we optimized for our fant.
Video: Book Over Calendar Blocks with the Meeting Tool
By: Kyle Jepson
This update to HubSpot will help sales and CS reps book meetings on the spot - so useful!
Video: How to Clone Products
By: Kyle Jepson
You can now clone products #HubSpotTipsAndTricks #HubSpot #CRM #Sales #SalesEnablement
Video: Best Practice for using the Forecast Tool
By: Alex Enache
If 2023 is the year when you want to put more structure in your sales team's processes and truly take forecasting to another level, you .
Video: Manage Updates on Import
By: Kevin van Beers
Running imports in HubSpot just became a little cooler! π When importing records into the CRM, you can now specify that you want to onl.
Video: Audit Properties with Data Quality
By: Amber Mizelle
Creating a new property is pretty simple in HubSpot, but how do you know which ones aren't being used so you can remove them? If you hav.
Video: Apply Presets to Entire Teams
By: Kyle Jepson
You can now apply presets to entire teams! #HubSpotTipsAndTricks #HubSpot #CRM #UserManagement cc
Video: And Filtering in Index Views
By: Kyle Jepson
big update to filtering the Index view in HubSpot - no more making active lists just to have the OR filter option! fantastic update
Video: Our Favorite Integrations
By: Juan Jaimes
Unleash the power of HubSpot with these essential integrations brought to you by Juan Jaimes π Hubspot is an all-in-one marketing, sale.
Video: Filter and Search Meeting Links
You can now filter and search your list of meeting scheduling pages #HubSpotTipsAndTricks cc