I created a custom button. What I want is for it to trigger the
Add to cart function. Aside from the default add to cart button I want a new add to cart button that will do the same thing. How can I achieve this in Magento 2?
Edit: The reason I want to do this is because my custom button is inside a separate form but what I want is when I click the submit button I want to submit the values of options from other form. I have custom options and have it's value so when I click my submit button I want to submit the value of that other form since the other form containing the custom button only contains the button and no other fields.