Ok to use "button" tag instead of "input" tag for forms?

Hey guys,

On foxy.io you guys give this example code for subscription form buttons:

<input type="submit" value="Subscribe">

But in the source code of the actual page, you guys are using the 'button' tag:

<button type="submit" class="btn btn-green"><span class="fa fa-plus-circle"></span> Subscribe</button>


I ask because I'm trying to insert some inline styling to my button text. So I'm guessing there is no problem using the button tag?

Thanks!

Comments
  • brettbrett FoxyCart Team
    Hey @Epotratz.
    No problems there. A submit input's normally what I do, but they'll both trigger the same form submit event for our JS to trigger off of.

    Just don't put a name attribute on the input or button. Had a support issue earlier today where that was causing a problem on old browsers with js disabled (with the link/form signing on). Took a while to figure out :)
Sign In or Register to comment.