Custom Field in single-product.php variation Form (1 post)

  1. alexcsandru
    Posted 2 years ago #

    I need to submit a custom text field in a single-product.php Form, before add to cart...

    I made a screenshot for a better understand.

    Screenshot : http://oi39.tinypic.com/2la7hn9.jpg

    Where the POST data is submited without an action ... and after submit make a redirect to cart ... (so, is not a SELF page...)

    <form method="post">
    <input type="hidden" name="variation_id" value="" />
    <input type="hidden" name="add-to-cart" value="<?php echo $product->id; ?>" />
    <input type="hidden" name="product_id" value="<?php echo esc_attr( $post->ID ); ?>" />
    <!-- And my custom input -->
    <input type="text" name="imei-code"></input>
    <input type="submit"></input>

    How to extract $_POST['imei-code'] ??? From where? Where is data submited?!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic