Combine Form Submission Button with Add to Cart

I’m currently attempting to build a software for sale service website and I’m hoping to allow users to submit basic information for orders on the product page. Right now I’ve placed a form within the product page, is there anyway I can merge the form submission and add to cart button so the user can just press the add to cart button and is redirected to the cart page but the form has also submitted?

Thanks in advance.

Hi, @Lucas20093! I want to do the exact same. Were you able to do it?

1 Like

Hey guys, I’m guessing you can use a short custom code like below for this. Though if this is part of a transaction I would want to look into use cases where if the Form is not complete, the cart button can’t be clicked.

$('.cart-button').on('click', function(){

This is great. I am fairly new to Webflow. This is supposed to go in the body part of the code of the product page, right? Also… So I need to add an ID to the form Submit button? Or is that button not necesarry anymore?

Thanks for your help, @dennyhartanto.

About the cart button not being being disabled for clicking when the form is not complete, there should be some kind of conditional that can be used, right?