hi , i am designing a template for whmcs for a customer , i have placed a domain search form in header , adding funds for invoices is enabled .
so in add invoice page there are 2 forms ,
in this link it creates a problem :
clientarea.php?action=addfunds
one form is this which is placed in header.tpl in body part of the generated template :
<form action="./domainchecker.php" method="post">
<input type="hidden" name="token" value="xxx" />
<input type="hidden" name="direct" value="true" />
Domain: <input type="text" name="domain" size="20" /> <select name="ext">
<option>.com</option>
</select>
<input type="submit" value="Go" />
</form>
the second form which is for adding funds and comes from this file :
clientareaaddfunds.tpl
form2 below the first form after some lines...:
<form method="post" action="clientarea.php?action=addfunds"><p align="center"><input type="text" name="amount" size="10" value="100.00" /><select name="paymentmethod"><option value="mailin">mail in payment</option></select></p><p align="center"><input type="submit" value="addmoney" /></p></form>
when i click on adding money :
the page redirects to an ajax progressbar , it creates the invoices correctly , but i dont know why it reads the action of first form !! maybe there is a bug in whmcs ajax or the mail in payment gateway? it simply reads the action link of first form in page not the correct related form ,
so for example in action of first form , i type : <form action="google.com" method="post">
it creates the invoice , then instead of going back to the generated invoice , it redirects to the google.com page !
i have tested in 2 different whmcs versions of other customers with other templates and in both whmcs the same thing happened . any suggestions ?
so in add invoice page there are 2 forms ,
in this link it creates a problem :
clientarea.php?action=addfunds
one form is this which is placed in header.tpl in body part of the generated template :
<form action="./domainchecker.php" method="post">
<input type="hidden" name="token" value="xxx" />
<input type="hidden" name="direct" value="true" />
Domain: <input type="text" name="domain" size="20" /> <select name="ext">
<option>.com</option>
</select>
<input type="submit" value="Go" />
</form>
the second form which is for adding funds and comes from this file :
clientareaaddfunds.tpl
form2 below the first form after some lines...:
<form method="post" action="clientarea.php?action=addfunds"><p align="center"><input type="text" name="amount" size="10" value="100.00" /><select name="paymentmethod"><option value="mailin">mail in payment</option></select></p><p align="center"><input type="submit" value="addmoney" /></p></form>
when i click on adding money :
the page redirects to an ajax progressbar , it creates the invoices correctly , but i dont know why it reads the action of first form !! maybe there is a bug in whmcs ajax or the mail in payment gateway? it simply reads the action link of first form in page not the correct related form ,
so for example in action of first form , i type : <form action="google.com" method="post">
it creates the invoice , then instead of going back to the generated invoice , it redirects to the google.com page !
i have tested in 2 different whmcs versions of other customers with other templates and in both whmcs the same thing happened . any suggestions ?