If you have a complex WooCommerce product with many different options, it may be a good idea to split those options in a multi-step form. This tutorial will show how to achieve multi-step product options in your WooCommerce store.
What we’re building

We’ll create product options, split into multiple steps. A progress bar indicates how far the user is in the process before being able to add the product to their cart.
What you’ll need
- A store with WooCommerce (6.0 or higher) installed and configured. We assume this is already done on your end but just in case it’s not, you can read this article to get started with WooCommerce.
- Our Advanced Product Fields for WooCommerce (APF) plugin. This plugin is capable of adding options to your product and creating the multi-step product form.
Let’s get started!
1. Configure the options on your product
If you have APF up & running, edit your WooCommerce product and find the Custom fields
section under Product Data
:

Here, you can add all options that belong to your product. The important part is to wrap your options in sections. Each section will represent one step.
You can add sections by clicking New Field
and then choosing Section
and Section End
as field types. Adding fields to a specific section is as simple as dragging them between the Section
and Section End
fields.
On each Section
field, go to the Appearance
tab and add “step” as class name:

Below is an example of 2 sections each containing a few options:

In a later step, we’ll transform these sections into steps with some styling code (called CSS).
2. Add a tag to your product
Chances are you don’t want all your products to have the multi-step layout. Instead, we’ll create a product tag and only products with that tag will use the multistep layout.
In WooCommerce, create a new tag via Products → Tags. Set both the name and slug to “steps”:

Now add this tag to all your products that require the multi-step layout:

3. Add progress bar & buttons
Next, we need to add some HTML code to display a progress bar and buttons to navigate between the steps. That’s done by adding the code below to your site. Are you unsure how to add this code? Check out this article explaining two easy ways to add it to your site.
add_action('wapf_before_wrapper', 'wapf_before_wrapper');
function wapf_before_wrapper($product) {
if( ! has_term( 'steps', 'product_tag', $product->get_id() ) ) return;
?>
<div class="wapf-progress">
<div class="wapf-progress-bar"></div>
<div class="wapf-progress-steps"></div>
</div>
<?php
}
add_action('wapf_before_product_totals', 'wapf_before_product_totals');
function wapf_before_product_totals($product) {
if( ! has_term( 'steps', 'product_tag', $product->get_id() ) ) return;
?>
<div class="wapf_step_buttons">
<button class="button wapf_btn_prev" style="display:none"><?php _e('Previous','sw-wapf'); ?></button>
<button class="button wapf_btn_next"><?php _e('Next','sw-wapf'); ?></button>
</div>
<?php
}
Code language: JavaScript (javascript)
4. Add styling
In this step, we’ll add CSS to style the progress bar, buttons, and sections. Add the CSS below to your theme via Appearance → Customize → Additional CSS.
Please note the CSS may be a little different for your WordPress theme, but it should be pretty close. I’ve added some comments that may be useful to look at.
.product_tag-steps div.quantity, .product_tag-steps .button[name=add-to-cart] {
display:none;
}
.product_tag-steps .wapf-wrapper {
border-radius: 4px;
border: 1px solid #ededed;
padding: 15px 20px;
margin-bottom:20px;
}
.product_tag-steps .wapf-field-group .step {
display:none;
}
.product_tag-steps .wapf-field-group .step:first-child {
display:flex;
}
.product_tag-steps .wapf_step_buttons {
margin-bottom:20px;
overflow:hidden;
}
.product_tag-steps .wapf_btn_next {
float:right !important;
}
.product_tag-steps .wapf-progress {
position:relative;
max-width:450px;
width:100%;
margin: 0 auto;
}
.product_tag-steps .wapf-progress:before, .product_tag-steps .wapf-progress-bar {
content:'';
position:absolute;
height:3px;
width:100%;
background:#ededed;
top:14px;
left:0;
}
.product_tag-steps .wapf-progress-steps {
margin-bottom: 30px;
overflow: hidden;
counter-reset: step;
display: flex;
justify-content: space-between;
}
.product_tag-steps .wapf-progress-steps div {
position:relative;
}
.product_tag-steps .wapf-progress-steps div:before {
content: counter(step);
counter-increment: step;
width: 30px;
height:30px;
font-size:16px;
line-height:30px;
border-radius:50%;
text-align:center;
display: block;
font-size: 10px;
background: #ededed;
}
.product_tag-steps .wapf-progress-steps div.active:before {
background:#f0632b; /*The finished step color. Feel free to change*/
color:white;
}
.product_tag-steps .wapf-progress-bar {
background:#f0632b; /*The finished step color. Feel free to change*/
width:0%;
}
Code language: CSS (css)
5. Make things dynamic
By now, you’ll see the multi-step form is displayed nicely on your Woo product page. But it needs some Javascript logic to make things work. Add the following code to your theme (remember this article from earlier on how to do it):
add_action('wp_footer', 'wapf_steps_script', 1000);
function wapf_steps_script(){
?>
<script>
jQuery( function($) {
var steps = $('.wapf-section.step');
if(!steps.length) return;
steps.first().addClass('stepActive');
var maxSteps = steps.length;
var $prev = $('.wapf_btn_prev');
var $next = $('.wapf_btn_next');
var $stepList = $('.wapf-progress-steps');
var $bar = $('.wapf-progress-bar');
var $cart = $('div.quantity,[name="add-to-cart"]');
var $progress = $('.wapf-progress');
var currentStep = 1;
for(var i = 1; i <= maxSteps; i++) {
var $div = $('<div>');
if(i === 1) $div.addClass('active');
$stepList.append($div);
}
var post = function( e, blockscroll ) {
var visibleStepLi = $stepList.find('div:visible');
var idx = $stepList.find('div').index(visibleStepLi.eq(currentStep-1));
idx = Math.max(0,idx);
var max = visibleStepLi.length;
if(e) e.preventDefault();
steps.hide().removeClass('stepActive');
steps.eq(idx).css('display','flex').addClass('stepActive');
$stepList.find('div').removeClass('active').eq(idx).addClass('active').prevAll().addClass('active');
if(currentStep >= max) {
$cart.show();
} else $cart.hide();
$bar.css('width', (currentStep-1)*(100/(max-1))+'%');
$prev.hide();
$next.hide();
if(currentStep < max) $next.show();
if(currentStep > 1) $prev.show();
if(!blockscroll) $stepList[0].scrollIntoView();
$(document).trigger('wapf_step', [currentStep, max] );
}
var isValid = function() {
var $inputs = steps.filter('.stepActive').find(':input');
for(var i = 0; i < $inputs.length; i++) {
if(!$inputs[i].checkValidity()) return false;
}
return true;
}
$prev.on('click', function(e) {
currentStep--;
post(e);
});
$next.on('click', function(e) {
var valid = isValid();
if(isValid()) {
currentStep++;
post(e);
}
});
$(document).on('wapf/dependencies', function(){
$stepList.find('div').removeClass('wapf-hide');
steps.each(function(i,s) {
var $s = $(s);
if($s.hasClass('wapf-hide')) $stepList.find('div:eq('+i+')').addClass('wapf-hide');
});
if($stepList.find('div:not(.wapf-hide)').length <= 1)
$progress.hide();
else $progress.show();
post(null,true);
});
// Block enter key to prevent jumping to another step on accident.
steps.find('input, select').keypress(function(event) { return event.key != 'Enter'; });
});
</script>
<?php
}
Code language: PHP (php)
The script will make sure the progress bar is updated correctly, and the “previous” and “next” buttons do show the correct section.
That’s it! Now you should have a working multi-step form with additional options on your WooCommerce product(s)!
Creating a multistep product in WooCommerce is easy … with copy & paste!
Phew, thanks for bearing with me during this tutorial!
By following the step-by-step tutorial provided in this blog post, you can split your product options into multiple steps and display a progress bar to guide users through the process.
If your product has many extra options, a multistep form creates a more seamless and user-friendly shopping experience.
Check out our working demo here:
In the step by step, can you select products that we have at woocomerce? or does it only work with variations?
Hi Leandro,
With our Extended version you can also set your Woo products as options :-).
I set this up but for some reason I’m getting an error message that says “Please select some product options before adding this product to your cart” even though I selected all of the options I was supposed to. Why is that happening?
Hi,
This sounds like a possible technical issue unique to your site. Please send us a technical support request and we’ll get on it asap! Thanks!
This code seems to work fine for sections that are created in the products Custom Field box. But if you load in sections using Product Fields Group, they all load in with the progress bar(doesn’t hide the next sections) if you fill out the form or what’s needed and click next then everything functions correctly. Its just the initial load it doesn’t hide the sections. I can give example page just don’t want to post a link here.
Hi Kyle,
You can contact us through our technical support form and include a link.🙏
Hello,
I have a question about multi-step form. Is it possible to create steps combining both the universal product fields found in the Woocommerce menu AND the custom fields found in the product menu?
Most of my products use four custom fields at the beginning of the form and three universal product fields found at the end of the form. It would be great to have a multi-step form that combines all seven. Is this possible?
Thank you!
Hi,
This is currently not possible, sorry. I have added it to our “research” list to see what the possibilities are to make this happen!
Hi there! I created a product with this tutorial and it’s working perfectly, except the number of steps always seems to be 4. I have made 2 sections but the form shows 4 steps. Is there a way to automatically change the number of steps to the number of sections with the ‘step’ class or am I missing something?
Thanks!
Hi Stacey,
This sounds like a technical issue. We would need more information before we can help. Please send us a support request here. Thank you!
I am interested in this plugin, but I am currently using a plugin called Enquiry that converts the ‘add to cart’ function to an inquiry form. I would like to know if this plugin will work together before I purchase please. What I am trying to do is provide a 3-step checkout process:
Service > Theme > Addons > add to inquiry (cart)
Here is the link to the enquiry plugin: https://piwebsolution.com/
Our plugin integrates with the paid version of Yith Request a Quote. We do not support the plugin you mentioned so we can’t know for sure it will work, sorry.
Hi, I am looking to set up something like a multi-step checkout. However, instead of modifying the product at each step towards checkout, I want to display some information to determine if this particular customer can purchase the digital product.
For example:
1. Select destination country
2. (Optional) Arrival time and date
3. Choose the digital product
4. Check supported devices
5. Login | Register
6. Proceed to checkout and complete payment
This information can be sent via webhook when the checkout is completed to initiate the provisioning process for the digital product.
That’s not something our plugin can do, sorry!
how many classes are there of this plugin like a class of step how much more and for which purpose can you please define that for us
Hi,
I am not sure I understand your question, but it sounds like a technical question. Please reach out to us via the technical support form and provide additional information. Thanks!
Hi Maarten,
I’ve followed your steps to create the multi-step product options, however when I set conditional fields, the number of steps reduces as it should, but when you click on the ‘next’ button it shows an empty step.
What piece of code can I add so that when there is a conditional field, the next button skips correctly to the next field.
Thanks!
Hi there,
This sounds like a technical support request. Can you please create a ticket here?
Thank you!
Hello!
Can I create similar multi-step coffee subscription flow?
https://prestocoffee.com/pages/subscription-flow
Hi!
You can create the options and multi-step format with our plugin, yes! Of course, it won’t look exactly the same as the example you linked. It looks like you would also need WooCommerce Subscriptions.
Hello, is it possible to automatically get to the top of the page when you click next step?
Yes, that would be possible by editing the code. If you contact us through our support form, we can help out!
How can you change the size of the thumbnails in the Multi-Select image swatches field? They show too big, I tried changing the size of the image itself but it scales them up and look low quality
Can you send us a technical support request here please? Thanks!
Is it possible to use product variations and attributes as fields?
No, that’s not possible, sorry.
Hello,
Can I ceate something like this: https://www.diyblinds.com.au/blinds/roller-blinds/order ?
Hi there,
In terms of options: yes. But of course it will not look exactly like the example you sent.
Is this plugin WPML compatible? And if so, can ‘Next’ and ‘previous’ be translated with WPML?
Yes and yes 🙂
Hi there,
I have a website with this method and it is not working correctly. Can you please help how to fix it?
Hi there,
Can you open a technical support ticket here? Include a link to the product so we can check.
Thanks!
Hi, My client wants to sell custom picture frames, user will select various static options and then enter width and height, Can I calculate a specific price based on the width and height using a formula? Do I need another plugin to do this?
i.e. 1cm = £1.00
width = 100cm
height = 50 cm
cost = 100+50x£1 = £150.00
Hi there,
Our plugin can do this :-). Even better, you can do that with the cheapest version of the plugin.
I have the “Pro” plugin. I am getting the following error with the last code snippet. “The snippet has been deactivated due to an error on line 4:
Cannot redeclare function wapf_steps_script.”
Hi there,
Please fill out our technical support form so we can help out better :).
Thanks!
Hi, I’ve also bought your plugin. I need to know if there’s the possibility in the steps to transfor the add to cart button into a “Ask for information” button.
For example if I add a field “Choose color” and in the option I set “Red”, “Blue”, “Green” and “Custom”, if the user choose “Custom” the Add to cart button should become “Ask for information” so the user can’t be able to buy that product but I receive an email with the information that he chose.
Thank’s in advance
Hi there,
What you’re looking for is called a “Request a Quote” plugin. We integrate with the one from Yith. The problem is that you want want both states at the same time: sometimes “add to cart” and sometimes “ask for info”. Unfortunately, that’s not possible I’m afraid. Such plugins can only do it for a whole product, or not at all.
Hello,
is it possible to include names and display it in the progress bar instead of numbers?
So instead of numbers it could be something like “1.Colour” “2. Size” etc.
And the other question is it possible to jump between sections for example when you are at 1 and want to watch number 3 without doing something in 1?
Thank you 🙂
P.S Your Plugin is great
Hi there!
This is currently not possible but we’re working on something that will be able to do both your questions 🙂
Hi!
We made the decision to purchase your plugin because of this neat tutorial, but we’re having issues. The initial HTML provided doesn’t display anything on our store page, and it seems like the very first function isn’t doing anything at all. We followed every step exactly without changing anything and used the Snippets plugin, but even copying & pasting the shortcode for that HTML snippet onto our store page doesn’t work. Instead it throws an error about there being an unexpected end bracket on line 12 but, as you can see when looking at the code you posted, there is no such bracket?
Hi Amber,
This sounds like a technical request. Can you contact us through our technical support form? That will send it to the correct people 🙂
Hi Maarten,
I’m just checking the multi-step form, and I just wondering if the variables that are asked for height and width can be used for a cost calculator. In my case, I just want a client to choose a cover for a swimming pool and height, width and length are a needed to create a cost. So I don’t know if your plugin can do this or we can add some another function to do this extra calculator.
Please let me know as I need to quote this for a job.
Thanks,
Hi Fernando,
Our plugin allows for formula-based pricing where you can create a cost based on fields filled out by your customers. So yes, this is possible :).
Hi, thanks for the amazing tutorial. Is there a way I can use it without the progress bar? How can I hide it ? whenever I hide it with every step it shows back.
Thank You!
Hi Remi,
This sounds like a technical request for us to look into. Please send us a support request here.
Thanks!
Hello, my customers often find themselves stuck on final step (not being able to click add to cart button). The issue seems to be [upload photo] field on previous step is not finished uploading or didn’t uploaded at all. Is there a way to restrict customer from clicking next button until they successfully uploaded? Similar to other input fields.
I hope there’s a fix for this as it’s costing a lot of potential customers.
Thank you and more power!
Hi there!
This sounds like a technical request so please contact our support department via the Technical Request form here.
Hi! Can I have this work on a group of products based on a tag so I can just add a tag to the products I want to use this step process?
I’m hoping to not have to keep editing the codes every time I add a new product.
Thank you for your help.
Oh! I can’t use the all products option. I do have many that are not in need of this step process. Thanks!
Hi there,
We’ll turn this into an addon plugin soon and then you’ll have more options to apply this to multiple products in one go :).
Is there a way to integrate it with Google maps API? I working at transport calculator and the cost depends from distance of two points.
Hi there,
Unfortunately, that’s not possible with our plugin, sorry!
Is there a way to change the way pricing is displayed from US standard to European standard, so . is 1,000 separator and not , ?
Yes, WooCommerce has settings for that. Go to WooCommerce > Settings > General > Currency Options to change the separators.
Hello, amazing plugin, just a query, how can I get this transition effect when I change steps, as this page shows that uses the same method.
https://preprod-slagon.fr/mamy-eyewear/produit/albert/
thank you.
Hi there!
That would require custom coding 🙂
Is there a good way I can show a summary of what the user has chosen at the last step? How can I find these variables if I have to modify the code?
There’s currently no way of doing that but it is a much requested feature so it’s high on our to-do list :).
Hello,
Do you have an option to export all product fields for another website?
Thank you!
Hi Angela,
The plugin doesn’t have specific import/export settings yet (though it’s on our to-do list!). You can perform a database migration to copy fields from one site to another.
Hi,
I’ve tried this but not getting a result, does it only work with the pro version of the plugin?
Hi Dylan,
Yes, you’ll need our pro version for this.
Hi Maarten,
Ok, this works great now.
Is it possible to hide all the info above the step solution once you click next?
So we would essentially be hiding short description once you click next.
Regards,
Dylan
Hi Dylan,
I’m not sure what you mean by that as usually there wouldn’t be any fields above the steps? If I misunderstood, please contact us through our support page so we can help out there!
Hi!
Can I add conditions in multi-step product options?
Yes you can, but depending on how far you want to take it.
Hello
With this plugin, i can add some custom fields on variations of products with variation on value?
Example:
Product 1> Variation 1> Insert 2 custom fields with diferent values
Product 2> Variation 1 and 2> Insert 3 custom fields, with one without any value
Hi there,
Yes, that’s possible :).
Hello i have a list of hundrends of products where i want the multistep to display and a list of hundrends of products where i dont want the multistep to display. Is there a way without hardcoding?
Yes, it’s possible by altering the code snippets. Send us a technical support request here and we’ll help you out.
Good morning, look at this
https://preprod-slagon.fr/mamy-eyewear/produit/product-example-2/
I have 4 steps on my form.
The last two choices of the first step Screen glasses and Non-prescription don’t need any configuration.
For these two choices the next steps are empty how to solve this problem sir ?
I would like to know how to skip empty steps.
Hi there,
This sounds like a technical request. Please use the support form here to get in touch with us so we have all the necessary information to help you out.
Thank you!
Hello, I want to show prices in the last step, except showing at the end of each step. Is that possible?
Not without additional custom coding, sorry!
Thanks for your quick response . We insist on the possibility of using this plugin.
However, we have the following question.
Can we associate costs to those fields? . So that they add to the final product.
Thanks in advance .
Yes, that is possible.
We need to know if the plugin can work with conditional products. That is, if I choose option X it offers me a selection of products, if I choose option Y it offers me another selection.
Our plugin works with conditional fields, but not products. You can show/hide fields based on values of other fields. You can not show products based on field values.
Can i add a video of instruction on any step to guide users how to fill up fields for that particular step ?
Can i also show automated options after selecting specific height?
Hi there,
Our plugin allows you to add text/html to your products so you can link to a video with instruction. I’m not sure what you mean with your 2nd question.
How to translate the Previous and Next buttons ?
Hi Philippe,
You can edit the code from step 2 to add your own wording. I have highlighted the words in this screenshot: https://i.snipboard.io/6Ct47s.jpg
Thanks Maarten !
How do I add an automatic progress bar? I don’t want to click the next button. This will automatically take me to the next step.
Hi there,
That would require additional custom coding I’m afraid.