Jump to content

how to have 2 forms in whmcs templates?


LAZer414

Recommended Posts

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 ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated