Im writing a project and i have to create a field in product detail to get number . Like this

enter image description here

To do this , i refer to product.info.extrahint and put my block inside . But when i click submit button , it alway refer to add cart page even if action form are whatever . Im confusing . Any idea to help me out ? . Thank in advance

  • I would assume, this block is inside the add-to-cart form. Oct 25, 2014 at 18:37
  • Thank you for reply , Fabian . Do you have any advice for this case ?
    – freeman167
    Oct 26, 2014 at 0:06
  • Either put YOUR form outside the magento core form or use JS to collect the data and send it via js Oct 26, 2014 at 9:51

3 Answers 3


Youre problem is that you have a form inside a form.

check catalog/product/view.phtml ~ line 42:

<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>

~ line 104:


Somewhere in between you are loading the extra form with the product.info.extrahint block

  • Thank you . But i still want to do that . What should i do ?
    – freeman167
    Oct 26, 2014 at 0:09
  • Nested forms are not valid HTML. You should find another way.
    – ProxiBlue
    Oct 26, 2014 at 1:47

If you put your form in view.phtml it will trigger add to cart button. You need to move block out from the form.


Done . I used java script and set onclick attribute for my button to pass product form .

Thank all

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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