I am using a custom button which uses a href and I was wondering if it is possible to change the input submit checkout button from using an input to using a href?

So from something like this

<input type="submit" name="submit" value="Add to Cart" class="btn btn-primary" />


<a href="#">Add to Cart</a>



Not possible, because an <a> element doesn't submit the form.

If you don't like <input type="submit">, you can also use <input type="image"> or a <button> element, and you are free to style all of these however you like using CSS.

  • You can still style the submit button the same way as an <a> tag. Feb 3 '13 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.