To create a multi-step form in Webflow where users must select at least one radio button before proceeding, you’ll need to use Webflow’s Form and Slider components together, combined with minimal custom logic using interactions and required attributes.
- Use a Slider: Add a Slider component to your Webflow project. Each Slide will represent one step of your form.
- Add a Form: Place a Form Block inside the Slider, spanning all slides.
- Form Fields: Inside each Slide, add your respective radio button fields or other form elements per step.
- Select the Radio Button Group: Each radio button should belong to the same “Name” group (e.g.,
question1
). - Set Required Attribute: Select one of the radio buttons in the group and check the “Required” checkbox in the element settings. This applies to the whole radio group.
- Remove Webflow’s default slider arrows.
- Add a custom “Next” button inside each slide.
4. Create an Interaction to Validate Before Slide Change
- Select the Next Button inside the slide.
- Go to Interactions > Element Trigger > Mouse Click (Tap).
- Set a new interaction: choose Custom animation.
- For the action, choose Run JavaScript (using a Webflow Embed or Site-wide code).
- In your custom code, check if a radio button in the group is selected. If yes, use Webflow's slider API or simulate the “Next” button click; if not, prevent the action or show a warning.
Since Webflow does not have a built-in conditional step-progress validator, you must automate it via a small script.
5. Add Custom Script for Validation
Inside Page Settings > Footer Code, paste a script like this (modify field names as needed):
<script> document.querySelectorAll('.next-btn').forEach(function(btn) { btn.addEventListener('click', function(e) { const currentSlide = btn.closest('.w-slide'); const requiredGroup = currentSlide.querySelector('input[type="radio"][required]'); const formName = requiredGroup ? requiredGroup.name : null; const groupChecked = formName ? currentSlide.querySelector(`input[name="${formName}"]:checked`) : null; if (!groupChecked) { e.preventDefault(); alert('Please select one option before continuing.'); } else { // Simulate next slide const nextHandle = document.querySelector('.w-slider-arrow-right'); if (nextHandle) nextHandle.click(); } }); });</script>
- Replace
.next-btn
with your actual Next button class. - The script checks for a selected radio button and only then allows slide progression.
6. (Optional) Hide the Default Arrow Navigation
- To prevent users from skipping steps, hide or remove Webflow’s default slider arrows using the Style panel or
display: none
.
Summary
To ensure users select a required radio button before moving to the next slide in a multi-step Webflow form, combine:
- A Slider component for step navigation.
- Radio buttons marked as Required for validation.
- Custom Next buttons with JavaScript to check for selection before moving to the next step.