Hello everybody.
I am trying to do a simple order form, by using the Webform module. I am starting by inserting a simple HTML form in my node-product.tpl.php file which gets the title and the price of the product:
<form method="post" action="http://drupalstore.shop.kg/content/order-form">
<input type="hidden" value="<?=$title;?>" name="product-name">
<input type="hidden" value="<?=$node->field_product_price['und'][0]['value']?>" name="product-price">
<input class="order-button-small" type="submit" value="Order">
</form>In the Webform "body" field I display the title and the price of the product by using this code:
<span>Product: </span><span class="wf_value"><? echo $_POST['product-name']."<br/>"; ?></span>
<span>Price: </span> <span class="wf_value"><? echo $_POST['product-price']."<br/>"; ?> </span>Until here everything works fine. The values display properly in the webform. However after I send it, the values disappear from the webform results.
Would it be best two tweak the Webform module and make it include the "body" field in the form resutls, or simply use php code to insert the values into the webform-submission-page.tpl.php template?
I am sure that the solution would be simple, but my little php and Drupal experience prevents me from seeing it. Please help!