Currently I have a function called redeem_coupon()
in one of my modules in a EE2 project. I also have the button in a <form>
element to link the function to. I know I have to add the function to the database table called exp_actions. I have the following code for the button:
<form action="./" name="redeemcouponform">
<table>
<tr>
<td><input type="text" name="couponcode" maxlength="12"/></td>
<td><input type="submit" name="submit" value="APPLY" class="button tiny success" /></td> </tr>
</table>
<input name="ACT" value="{AID:Lb_cart:redeem_coupon}" type="hidden">
</form>
Is there any specific way I need to connect the button to the ACT so it can fire the function when the button is clicked?