Index page      Samples & tests home

HTML Signup form

PAP has a standard signup form here, but it allows you to make your own signup form in HTML and place it anywhere you want.

HTML Signup form
POST returned this data
Personal Info
Username (Email)
First name
Last name
Referral ID
Additional info
Web Url
Company name
Street
City
State
Country
Terms & conditions
I confirm that I agree with terms & conditions


HTML source code for this signup form
<form action="http://www.yoursite.com/affiliates/signup.php" method="post">
<fieldset>
    <legend>Personal Info</legend>
    <table cellpadding="3">
      <tr><td width="150px"><strong>Username (Email)</strong></td><td><input type="text" name="username"></td></tr>
      <tr><td><strong>First name</strong></td><td><input type="text" name="firstname"></td></tr>
      <tr><td><strong>Last name</strong></td><td><input type="text" name="lastname"></td></tr>
      <tr><td>Referral ID</strong></td><td><input type="text" name="refid"></td></tr>
    </table>
    </fieldset>

<fieldset>
    <legend>Additional info</legend>
    <table cellpadding="3">
        <tr><td width="150px"><strong>Web Url</strong></td><td><input type="text" name="data1"></td></tr>
        <tr><td><strong>Company name</strong></td><td><input type="text" name="data2"></td></tr>
        <tr><td><strong>Street</strong></td><td><input type="text" name="data3"></td></tr>
        <tr><td><strong>City</strong></td><td><input type="text" name="data4"></td></tr>
        <tr><td><strong>State</strong></td><td><input type="text" name="data5"></td></tr>
        <tr><td><strong>Country</strong></td><td><input type="text" name="data6"></td></tr>
    </table>
    </fieldset>

<fieldset style="text-align: center">
    <legend>Terms & conditions</legend>

    <textarea cols="50" rows="5">You can write your own terms & conditions here</textarea>
    <br/>
    I confirm that I agree with terms & conditions <input type="checkbox" name="agreeWithTerms" value="Y">
    <br/><br/>
    
    <?php
      if(array_key_exists('cumulativeErrorMessage', $_POST) && $_POST['cumulativeErrorMessage'] != '') {
    ?>
    <fieldset style="color: #ff0000;">
        <legend>There were errors</legend>
        <?php echo $_POST['cumulativeErrorMessage']?>
    </fieldset>
    <?php
      }
    ?>
    <br/>
    
    <input type="submit" value="Signup">
    <input type="hidden" name="errorUrl" value="http://www.yoursite.com/html_signup_form.php">
    <input type="hidden" name="successUrl" value="http://www.yoursite.com/after_signup.php">

</form>

Documentation


The HTML signup form must be sent to /affiliates/signup.php after signup. Then there are two modes of operations. If you don't include the errorUrl,successUrl hidden fields, the form will be processed by standard signup form.
If there are some errors, they will be displayed in the standard signup form.

If you want to be sent back to the HTML signup form in case of error, you have to add hidden field errorUrl to the form and this file have to be PHP! Then the error messages and all values will be sent back by POST method to the URL you specified in errorUrl hidden field.

Possible HTML form parameters (as hidden fields)
errorUrl  URL where the data should be sent in case of error. It should be URL address of the HTML signup form
successUrl  URL where the data should be sent when signup is successful. It will override any setting from merchant panel. It can be "thank you for signup" page.
Data returned to successUrl or errorUrl
cumulativeErrorMessage  all (optional) error messages grouped together in on string
successMessage  success message
list of fields  list of signup form fields returned with the value sent and (optional) error message.
Example:
username - contains value entered by user
usernameError - contains error message for this field
firstname - contains value entered by user
firstnameError - contains error message for this field



Affiliate software by QualityUnit