How can I change the image of an "PreviewDiv" block when I click on a radio button div block in a collection list using Webflow?

Published on
September 22, 2023

To change the image of a "PreviewDiv" block when clicking on a radio button div block in a collection list using Webflow, you can follow these steps:

  1. Create a collection list: Before you begin, make sure you have already created a collection list with the necessary fields, including an image field and a radio button field.

  2. Add a radio button div block: Within your collection list, add a div block for the radio button. Style it according to your design needs.

  3. Set the "PreviewDiv" image: In the "PreviewDiv" block, add an image element and connect it to the image field in your collection. Set the initial/default image you want to display.

  4. Add an interaction: Select the radio button div block and go to the Interactions panel. Create a new interaction for the click trigger.

  5. Choose the "Affect different element" target: In the interaction panel, select the "Affect different element" target option. This allows the interaction to affect a separate element on the page (in this case, the "PreviewDiv" block).

  6. Set the "PreviewDiv" image change: In the interaction panel, choose the "Change element's image" action. Select the "PreviewDiv" image element as the target and choose the new image you want to show when the radio button is clicked.

  7. Customize the interaction: Adjust any additional settings like duration, easing, or delay to fine-tune the interaction behavior.

  8. Save and publish: Save your changes and publish the site to see the updated interaction in action.

The above steps should allow you to change the image of a "PreviewDiv" block when clicking on a radio button div block in a collection list using Webflow. Remember to customize the interaction and styling based on your specific design requirements.