Mandatory Fields

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
rarmy
Posts: 19
Joined: Sat Mar 17, 2012 9:58 pm

Mandatory Fields

Post by rarmy »

Script URL: http://www.rarmy.com/gbook
Version of script: 1.7
Hosting company: atjeu.com
URL of phpinfo.php: http://www.rarmy.com/info.php
URL of session_test.php: http://www.rarmy.com/gbook
What terms did you try when SEARCHING for a solution:mandatory, mandatory fields, trolled the forums.

Write your message below:

Maybe I missed it, but is there a way to make the location and email field mandatory as well??? just asking...

Thought I saw something but am unable to find again...
Roy "Boomer" Army
My Home Site
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: Mandatory Fields

Post by Klemen »

=> To make email required:

In gbook.php find and delete this exact code

Code: Select all

strlen($v['email']) > 0 && 
=> To make "From:" required:

In gbook.php just under

Code: Select all

	if (empty($name))
	{
        $error_buffer .= $lang['e03'].'<br class="clear" />';
	}
add

Code: Select all

	if (empty($from))
	{
        $error_buffer .= 'Please enter your location<br class="clear" />';
	}
=> You will also want to make "From:" and "Email:" lables bold in the sign form HTML (templates/default/sign_form.php).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
rarmy
Posts: 19
Joined: Sat Mar 17, 2012 9:58 pm

Re: Mandatory Fields

Post by rarmy »

Tnks...worked after doing it a couple of times...probably should go to bed...took to long to figure out...hehehe...
Roy "Boomer" Army
My Home Site
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Re: Mandatory Fields

Post by Henrie »

You could also have found the solution in the topics listed in this thread viewtopic.php?f=3&t=371

Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
rarmy
Posts: 19
Joined: Sat Mar 17, 2012 9:58 pm

Re: Mandatory Fields

Post by rarmy »

Henrie wrote:You could also have found the solution in the topics listed in this thread viewtopic.php?f=3&t=371

Henrie
5 hour nap, feeling a little better. I KNEW I saw it somewhere...had added the read only mod already...thanks.

:lol:

follow up: I am assuming I need to redo the edits already done to make it work???
Roy "Boomer" Army
My Home Site
rarmy
Posts: 19
Joined: Sat Mar 17, 2012 9:58 pm

Re: Mandatory Fields

Post by rarmy »

follow-up; have installed all but the custom field in all three gbooks...sweet work, and thank you very much...
Roy "Boomer" Army
My Home Site
Post Reply