How can I make a purchase button appear only after a customer watches a video in Webflow, and show the sections of the website only when the customer clicks the button?

Published on
September 22, 2023

To make a purchase button appear only after a customer watches a video in Webflow and show the sections of the website only when the customer clicks the button, you can follow these steps:

  1. Create the video: First, you'll need to create the video that you want your customers to watch before the purchase button appears. You can use a video editing tool or an external video hosting platform to create the video file.

  2. Upload the video: After creating the video, you'll need to upload it to a video hosting platform like YouTube or Vimeo. These platforms will provide you with an embed code that you can use in Webflow.

  3. Add a video element: In Webflow, go to the page where you want the video to appear. Drag and drop a video element onto the page.

  4. Embed the video: With the video element selected, paste the embed code provided by the video hosting platform into the appropriate field in the Webflow settings panel.

  5. Create an interaction: Select the video element again and click on the "Interactions" tab in the settings panel. Create a new interaction by clicking the "+" button.

  6. Set up the interaction trigger: In the interaction panel, set the trigger for the interaction to be when the video finishes playing. Use the appropriate event on the video element to trigger the interaction.

  7. Add a class to the purchase button: Select the purchase button element and give it a specific class name, such as "hidden-button".

  8. Set the initial state of the purchase button: In the interactions panel, set the initial state of the purchase button to be hidden, using the class name you gave it.

  9. Create an interaction for the purchase button: Create a new interaction on the purchase button element. Set the trigger for the interaction to be when the customer clicks on the button.

  10. Set the interaction action: In the new interaction, set the action to show the hidden-button class when the button is clicked.

  11. Add sections to the page: Now you can create the sections of the website that you want to show or hide based on the purchase button click. Add these sections to the page and give them appropriate class names.

  12. Set the initial state of the sections: In the interactions panel, set the initial state of the sections to be hidden, using their respective class names.

  13. Create an interaction for the sections: Create a new interaction on each section element. Set the trigger for the interaction to be when the purchase button is clicked.

  14. Set the interaction action for the sections: In each interaction, set the action to show the respective section when the purchase button is clicked.

  15. Preview and test: Preview the page in Webflow's designer mode or publish it to a live site to test the functionality. Make sure that the purchase button only appears after the video finishes playing and that the sections are shown or hidden correctly when the button is clicked.

Additional questions:

  1. How do I create a video element in Webflow?
  2. Can I embed a video from an external source in Webflow?
  3. How can I create interactions in Webflow?