Help - Search - Members - Calendar
Full Version: Smart Search Signup Form Help Needed
Get Paid Forum - Get Paid Discussion > Webmaster's Corner > General Discussion on Building, Running & Making Money from a Website
freeandeasy
I could figure this out if the signup form was on a php page, but it's not, sooooooo.......

I want to make it so that members-to-be are unable to continue the signup process until they tick a box (or type I AGREE) saying they have read and understand the terms.

I can easily add the terms on the signup page in a scrolling text box. And I can add a box to be ticked.

But how do I make it so that they cannot successfully submit the form until they have ticked that box?

I only know how to do this on a php page.
modellor
I can write you the script you require. You have PM
freeandeasy
I don't need a script.

Here is my signup form:
CODE
<center>
<form method="post" action="signup.cgi">
<table>

<tr><td></td><td><b><font color="navy">Login Info</font></b></td></tr>
<tr><td align="right"><font color="navy">Username:</font></td><td><input type="text" name="username" value="<<USERNAME>>" size="12"></td></tr>
<tr><td align="right"><font color="navy">Password:</font></td><td><input type="password" name="password" value="<<PASSWORD>>" size="12"></td></tr>

<tr><td></td><td><b><font color="navy">Billing Info</font></b></td></tr>

<tr><td align="right"><font color="navy">Name:</font></td><td><input type="text" name="name" value="<<REALNAME>>" size="24"></td></tr>
<tr><td align="right"><font color="navy">Street Address:</font></td><td><input type="text" name="address1" value="<<ADDRESS1>>" size="29"></td></tr>

<tr><td align="right"></td><td><input type="text" name="address2" value="<<ADDRESS2>>" size="29"></td></tr>
<tr><td align="right"><font color="navy">City:</font></td><td><input type="text" name="city" value="<<CITY>>" size="16"></td></tr>

<tr><td align="right"><font color="navy">State/Province:</font></td><td><input type="text" name="state" value="<<STATE>>" size="16"></td></tr>
<tr><td align="right"><font color="navy">Zip:</font></td><td><input type="text" name="zip" value="<<ZIP>>" size="6"></td></tr>

<tr><td align="right"><font color="navy">Country:</font></td><td><input type="text" name="country" value="<<COUNTRY>>" size="16"></td></tr>
<tr><td></td><td><b><font color="navy">Contact Info</font></b></td></tr>

<tr><td align="right"><font color="navy">Phone:</font></td><td><input type="text" name="phone" value="<<PHONE>>" size="16"></td></tr>
<tr><td align="right"><font color="navy">E-mail:</font></td><td><input type="text" name="email" value="<<EMAIL>>" size="24"></td></tr>

<tr><td></td><td><input type="submit" value="Sign Up"><input type="reset" value="Reset"></td></tr>
</table></center>

<<HIDDENFORM>>
</form>


I can easily add a field to tick that says they have read terms, I just want to know what to add to make them unable to continue unless they tick that particular box.

I can do this if it were on a php page (it's just a very simple line of code), but I don't know how to do it in the html of a cgi perl script.
starsol
Rather than coding it into signup.cgi you could just use some JavaScript to stop the form from being submitted until the tick box was check.

A search on Google found me a few pages which could help you do this:

http://www.webdevforums.com/showthread.php?t=2884

http://javascript.internet.com/forms/accept-terms.html

Unforuntatelt the ~0.1% of people that don't have JavaScript enabled could still bypass this if you did use this method though.
freeandeasy
QUOTE (starsol @ Apr 22 2004, 10:14 AM)
http://javascript.internet.com/forms/accept-terms.html

Argh, I must have done something wrong.
I put the code in (and I have installed LOTS of javascripts, so I'm fairly experienced at it), but then I tried to make a test account without ticking the accept box and it let me sign up sad.gif
freeandeasy
Ummmmmmmm, I wonder if it would work if I put the header directly on the form page instead of using the header tag.
Worth a try..........
freeandeasy
QUOTE (freeandeasy @ Apr 22 2004, 01:00 PM)
Ummmmmmmm, I wonder if it would work if I put the header directly on the form page instead of using the header tag.
Worth a try..........

Don't know if that works. It won't let me make another test account.... huh.gif
SelfSupportiveSolutions
This might help. I don't know if it is dependent on php or not.

http://www.cashcrusader.info/cms/modules.p...howpage&pid=112
Sammi_Babe
Hi,

Try this script here:

http://www.dynamicdrive.com/dynamicindex16/acceptterm.htm

Description: Does your form contain an "Accept terms" section users must agree to before submitting the form? If so, this script helps enforce it, by disabling the submit button (in IE4+ and NS6+) or process (all other browsers) until he/she checks a box indicating compliance.

Hope this helps, will soon be implementing it on my site (when I get a chance!)

Sammi_Babe
AndrewZ
If you can it in PHP, why not just do <? CODE ?> wherever its needed?
freeandeasy
QUOTE (Sammi_Babe @ Apr 24 2004, 07:34 PM)
Hi,

Try this script here:

http://www.dynamicdrive.com/dynamicindex16/acceptterm.htm

Description: Does your form contain an "Accept terms" section users must agree to before submitting the form? If so, this script helps enforce it, by disabling the submit button (in IE4+ and NS6+) or process (all other browsers) until he/she checks a box indicating compliance.

Hope this helps, will soon be implementing it on my site (when I get a chance!)

Sammi_Babe

HEY, that looks like it might work!!
BUT: it says this:

QUOTE
<form name="agreeform" onSubmit="return defaultagree(this)">
Rest of your form here<br>
<input name="agreecheck" type="checkbox" onClick="agreesubmit(this)"><b>I agree to the above terms</b><br>
<input type="Submit" value="Submit!" disabled>
</form>

<script>
//change two names below to your form's names
document.forms.agreeform.agreecheck.checked=false
</script>


How do I determine what is my form's names? I'm also unclear on what exactly in that piece of code that I need to change.
huh.gif

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.