SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    calif
    Posts
    733
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Requiring Terms are read before proceeding

    I have a web page where the visitor pays a fee before proceeding. I'd like to add a requirement that the visitor "check" that he has Read The Terms, before he can proceed to pay. I have this html code of the pay page here:
    (There is also a php page that works with this html page).
    Code:
    <!--Begin Wide Column-->
    <div id="column-wide">
      <div id="generic-container" style="height:500px;">
    
      <div style="margin-left:12px; float:left;">
        <img src="themes/[var.user_theme]/images/icons/members_32.png" alt="members" width="32" height="32" align="absmiddle" />&nbsp;&nbsp;<strong>Pay Fee:
        &nbsp;<!--[var.members_total;comm]--></strong>
      </div>
      <div style="margin-right:12px; float:right;">
      </div>
      <br />
      <br />
    
      <div id="members-search">
    <br>
    	<table style="margin: 10px auto;border:1px solid lightgrey; background:lightyellow">
    	     <tr>
    
    		  <td width="150px"><br><u>Details</u></td>
    		  <td width="150px"><br><br><u>Pay Fee</u><br><br></td>
    		  <br>
    	     </tr>
    	     <tr>
    		  <td><br>Pay Fee<br><br></td>
       		  <td>
                   <form action="payment/paypal_start.php" method="post">
                     <input type="hidden" value="[var.user_id]" name="uid">
                     <input type="hidden" value="1" name="cre">
                     <input type="hidden" value="Pay Fee" name="itnm"><!-- Must match paypal_ipn.php name  -->
                     <input type="submit" value="0.01" name="valu">              <!-- Set dollar amount of fee here.  -->
                   </form>
                </td>
    	     </tr>
              <!-- ================================================================= -->
    	</table>
    <br><br>
    </div>
    </div>
    
    <!--End Wide Column-->
    And I grabbed this line of code from the Registration Page and added into the pay page, but of course it didn't work, by me just adding it:

    Code:
         <div style="margin-left:30px; float:left;"><a href="page.php?page=3" target="_blank"><span style="color: #800000;"><u>Read These Terms</u>&nbsp;</span></a>
    	          &nbsp;&nbsp;<b><span style="color: #000000;">Click Here</span><input type="radio" value="yes" name="terms" [var.checked] /><span style="color: #000000;">To Agree To The Terms</span>
            </div>
    Can you help me integrate a "required to read" instruction before proceeding, into the pay page?

    Thanks

  2. #2
    SitePoint Guru kish's Avatar
    Join Date
    Jun 2003
    Location
    UK
    Posts
    923
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should probably post this in the PHP or JavaScript forums, depending on which technology you'd prefer to use to accomplish this.

    JS can be used by starting with the "Next" button disabled, but then enabled when the checkbox is checked. JS is good because it doesn't need to reload the page, however if the user has JS disabled on their browser then you're stuck.

    PHP can be used by confirming whether the checkbox was ticked before proceeding to the next page, then returning an error if the checkbox was not checked. This is the most solid option, but the user has to wait for the page to refresh before being given the error.

    Or you could combine both with AJAX.

    Anyway, take your pick then look for help on one of the other forums where some experts might be able to help you write the code.

    Cheers
    Fast Fwd Multimedia
    Web, IT & Cloud Computing Consultancy
    Currently looking for web freelancers. Get in touch!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •