Page 1 of 1

Mandatory Fields

Posted: Mon Mar 19, 2012 1:25 pm
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...

Re: Mandatory Fields

Posted: Mon Mar 19, 2012 6:51 pm
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).

Re: Mandatory Fields

Posted: Mon Mar 19, 2012 8:13 pm
by rarmy
Tnks...worked after doing it a couple of times...probably should go to bed...took to long to figure out...hehehe...

Re: Mandatory Fields

Posted: Mon Mar 19, 2012 9:12 pm
by Henrie
You could also have found the solution in the topics listed in this thread viewtopic.php?f=3&t=371

Henrie

Re: Mandatory Fields

Posted: Tue Mar 20, 2012 1:43 am
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???

Re: Mandatory Fields

Posted: Tue Mar 20, 2012 5:03 am
by rarmy
follow-up; have installed all but the custom field in all three gbooks...sweet work, and thank you very much...