I have a HTML 5 form with two hidden fields. I need to assign the values of existing variables to each hidden field as shown below in. The form has a cgi action page where I recover the values of the variables and other field info which has been directly entered into the form.
Everything works, except the hidden fields. The variable names do not get translated into their numerical values - so all the form transmits is OrderID and TotalCost. I have tried using print(OrderID) and print(TotalCost) but that does no work.
Is here a special syntax to be used in html forms to address this ?
Thanks for any help
EXTRACT FROM HTML FORM
print("<input name='OrderID' type='hidden' id='OrderID' value='OrderID' />")
print("<input name='TotalCost' type='hidden' id='TotalCost' value='TotalCost' />")
CustomerID = formData.getvalue('CustomerID')
DelDate = formData.getvalue('DelDate')
DelTime = formData.getvalue('DelTime')
[b]TotalCost = formData.getvalue('TotalCost')
OrderID = formData.getvalue('OrderID')[/b]