How do I turn this form button info into just a link
<FORM name="USERFAVOUR" method="post" action="{$baseurl}/my_favour.php">
<input type="hidden" name="rvid" value="{$answers[i].VID}">
<input type="submit" name="removfavour" value="Remove Favorite"> </FORM>
It is calling on my_favour.php to remove something.
Please help.
Thank you.
Re: How do I turn this form button info into just a link
If you want it to be just a link, simply remove the hidden element, and voila. You'll have to change {$baseurl} to reflect the actual URL you want though, or have that done on the server if you know what you are doing.
However, if you want a link, a physical anchor is always preferred to a button for accessibility reasons.
Re: How do I turn this form button info into just a link
As a link, your form would be represented like this:
Code:
<a href="{$baseurl}/my_favour.php?rvid={$answers[i].VID}">Remove Favorite</a>
Note that the method will have changed from POST to GET.
Re: How do I turn this form button info into just a link
it think you can use submit function of form. Consider following code:
Code:
<a href="javascript: document.forms['USERFAVOUR'].submit()">Submit</a>