If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Advanced Guestbook 2.3.1  XML
Forum Index » Support Forum
Author Message
Anonymous



How do i set it up to make someone put in there email before saving to guessbook


with thanks

Data0002
fatjacK
Student
[Avatar]

Joined: 08/11/2004 22:27:28
Messages: 50
Location: Isle of Sheppey
Offline

think this is the posting you want

http://proxy2.de/forum/viewtopic.php?t=2877
[Email] [WWW]
data0002
Newbie

Joined: 15/11/2004 13:51:52
Messages: 3
Location: UK
Offline

Thank you for that fatjacK, but i still have one question to ask how do i set it up to check if the email address as being inputed right (eg not just the word test, to just bypass)

Thanks

data0002
fatjacK
Student
[Avatar]

Joined: 08/11/2004 22:27:28
Messages: 50
Location: Isle of Sheppey
Offline

I've just tried it myself and the link I gave you explained how to get rid of the required fields but not really how to add them.

I'm a bit of a newbie myself but I tried this and it seemed to work:

1. open form.php and find:


if(document.book.gb_name.value == "") {
alert("$LANG[ErrorPost1]");
document.book.gb_name.focus();
return false;
}


copy and paste it immediately below and change gb_name to gb_email and ("$LANG[ErrorPost1]") to ("$LANG[ErrorPost12]")

thus:

if(document.book.gb_email.value == "") {
alert("$LANG[ErrorPost12]");
document.book.gb_name.focus();
return false;
}


2.still in form.php find

<td width="25%" class="font1"><img src="$GB_PG[base_url]/img/email.gif" width="15" height="15"> $LANG[FormEmail]:</td>


and just add an * between [FormEmail] and :</td>

3. open english.php in the lang directory find the lines that begin with $lang and insert this one:

$LANG["ErrorPost12"] = "You forgot to fill in the email field. Please correct it and re-submit.";

as to verifying the email address I suspect a $VARS needs creating to ensure input is wildcard@wildcard - but thats beyond me.
[Email] [WWW]
data0002
Newbie

Joined: 15/11/2004 13:51:52
Messages: 3
Location: UK
Offline

thanks fatjacK, i sorted that bit out, at the mo if i leave it blank it tells me to fill it in, but then i can put just put 1 letter in the box and it passes, where i need the full email address

data0002
fatjacK
Student
[Avatar]

Joined: 08/11/2004 22:27:28
Messages: 50
Location: Isle of Sheppey
Offline

try this:

if(document.book.gb_email.value.search(/^.+@.+\..+$/)) {
alert("$LANG[ErrorPost12]");
document.book.gb_name.focus();
return false;
}
[Email] [WWW]
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Forcing people to leave an email will either scare them off or they will end up just putting crap@crap.blah

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
data0002
Newbie

Joined: 15/11/2004 13:51:52
Messages: 3
Location: UK
Offline

Thank you fatjacK for your help it now does what i want, Tanks again

Data0002
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum