sKunKbad Posted November 13, 2007 Share Posted November 13, 2007 I inherited some code which contains this button: <a href="checkout.php"><button type="button" name="checkout" value="Checkout">Checkout</button></a> which is inside a form, and the form has a regular submit button too, which is used to update the quantities of products in the shopping cart. This second button/hyperlink does not validate, but in order to make the page look good it has to stay where it is. Normally I'd just place it inside its own form tags, but I don't think it will validate to have a form inside a form. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/77207-strange-2nd-button-in-form-validation-issues/ Share on other sites More sharing options...
ToonMariner Posted November 14, 2007 Share Posted November 14, 2007 you could remove the button tag all together and style the a tag to llok like the submit button (you'd have to style the submit button a little too and note not all browsers will actually apply the styling on buttons), OR replace it with an input type="button" tag (would have to remove the a tag and use js to change location) Quote Link to comment https://forums.phpfreaks.com/topic/77207-strange-2nd-button-in-form-validation-issues/#findComment-391238 Share on other sites More sharing options...
sKunKbad Posted November 14, 2007 Author Share Posted November 14, 2007 I ended up removing it altogether, making a second form that sends the stuff that needs to go to the checkout. Quote Link to comment https://forums.phpfreaks.com/topic/77207-strange-2nd-button-in-form-validation-issues/#findComment-391252 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.