I have the following problem:
I have a form that allows a customer to configure a product using drop-down selection boxes. At the bottom, the click 'update' and the price is updated, etc.
Now, I want to add the 'Add to Cart' button but the way the code is currently is as follows:
<CFFORM action="THIS_PAGE" method="POST" enablecab="Yes">
--selectable options
<INPUT type="submit" name="operation" value="Update Price">
<INPUT type="submit" name="operation" value="Add to Cart">
</CFFORM>
The problem is that the CFFORM refers to itself when the customer clicks on update so that the prices are refresed but to get the item added to the shopping cart, I would need the following:
<CFFORM action="CART.CFM" method="POST" enablecab="Yes">
I tried to put a CFIF statement saying that if the 'update' button is pressed, process CFFORM 'THIS_PAGE' otherwise process CART.CFM
Of course, I got an extroneous </CFFORM> error.
Any suggestions on how to proceed.
I have a form that allows a customer to configure a product using drop-down selection boxes. At the bottom, the click 'update' and the price is updated, etc.
Now, I want to add the 'Add to Cart' button but the way the code is currently is as follows:
<CFFORM action="THIS_PAGE" method="POST" enablecab="Yes">
--selectable options
<INPUT type="submit" name="operation" value="Update Price">
<INPUT type="submit" name="operation" value="Add to Cart">
</CFFORM>
The problem is that the CFFORM refers to itself when the customer clicks on update so that the prices are refresed but to get the item added to the shopping cart, I would need the following:
<CFFORM action="CART.CFM" method="POST" enablecab="Yes">
I tried to put a CFIF statement saying that if the 'update' button is pressed, process CFFORM 'THIS_PAGE' otherwise process CART.CFM
Of course, I got an extroneous </CFFORM> error.
Any suggestions on how to proceed.