<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Making Changes To The Required Fields"]]></title>
		<link>https://proxy2.de/forum/posts/list/3.php</link>
		<description><![CDATA[Latest messages posted in the topic "Making Changes To The Required Fields"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Making Changes To The Required Fields</title>
				<description><![CDATA[ Thought this might be useful to someone... :D <br /> <br /> [u][b]How to change the required fields in Advanced Guestbook.[/b][/u]<br /> <br /> If a user submits an entry to Advanced Guestbook and doesn't fill in the Name and Message fields then the entry is rejected and an error message displayed.  You can change the fields that are required and the messages that are displayed.<br /> <br /> Apologies if some of this is a bit basic, most of you guys on the forum are well advanced and sometimes the responses are too technical for a beginer like me  :? , hopefully this explanation can be followed by all.<br /> <br /> [b]To change the required fields...[/b]<br /> <br /> 1 - Save copies of files before editing them.  These changes worked for me, if they don't work for you at least you can go back to where you were.  Files that get changes are: [i]form.php[/i] in the [i]templates[/i] subdirectory, [i]add.class.php[/i] in the [i]lib[/i] subdirectory and [i]english.php[/i] in the [i]lang[/i] sub-directory (or whatever language you're using).<br /> <br /> 2 - You need to delete the part of the script that checks to see if the field has been filled in.<br /> <br /> 3 - This example removes the requirement to fill in the Name field - the script for other fields is very similar (e.g. for comments it's [i]gb_comment.value[/i] as opposed to [i]gb_name.value[/i] and [i]ErrorPost2[/i] as opposed to [i]ErrorPost1[/i] etc).<br /> <br /> 4 - Open [i]form.php[/i] from the [i]templates[/i] sub-directory.<br /> <br /> 5 - Find the script in question.  The script that requires the Name field to be filled in is this (lines 13 to 17)...<br /> <br /> [code] if&#40;document.book.gb_name.value == &quot;&quot;&#41; &#123;<br />    alert&#40;&quot;$LANG&#91;ErrorPost1&#93;&quot;&#41;;<br />    document.book.gb_name.focus&#40;&#41;;<br />    return false;<br />  &#125;[/code]<br /> 6 - Delete it.<br /> <br /> 7 - You can delete other parts of the script in order to remove the requirement to fill in other fields (the code to delete will be very similar except it will have a different ErrorPost number and different name).<br /> <br /> 8 - Once you're deleted what you don't want save the file.<br /> <br /> 9 - Open [i]add.class.php[/i] from the [i]lib[/i] sub-directory<br /> <br /> 10 - Find the script in question.  The script that requires the Name field to be filled in is this (lines 189, 190 and part of 191)...<br /> [code]        if &#40;$this-&gt;name == &quot;&quot;&#41; &#123;<br />             return $this-&gt;db-&gt;gb_error&#40;$this-&gt;db-&gt;LANG&#91;&quot;ErrorPost1&quot;&#93;&#41;;<br />         &#125; else[/code]<br /> 11 - Delete it (only the first 6 characters from line 191, after deleting line 191 should start... [code]if &#40;strlen&#40;$this[/code]<br /> 12 - You can delete other parts of the script in order to remove the requirement to fill in other fields (the code to delete will be very similar except it will have a different ErrorPost number and different name).<br /> <br /> 13 - Once you're deleted what you don't want save the file.<br /> <br /> [b]To change the messages...[/b]<br /> <br /> 14 - If you've changed the required fields you might want to remove the asterisk that indicates required fields.  Open [i]form.php[/i] again and delete the asterisk where applicable (do a search for * and delete as required).<br /> <br /> 15 - If you've no longer got any required fields you may want to get rid of the bit that says [i]The blanks with (*) represent required fields[/i].  If so, open [i]english.php[/i] (or whatever language you're using) from the [i]lang[/i] sub-directory and edit the message - in this case it's called [i]FormMess1[/i] and is on line 28.<br /> <br /> 16 - Whilst you're in [i]form.php[/i] you can change your other messages.<br /> <br /> That's it.  Hope someone finds it useful.<br /> <br /> Trevor]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/2877/7614.php</guid>
				<link>https://proxy2.de/forum/posts/preList/2877/7614.php</link>
				<pubDate><![CDATA[Tue, 9 Mar 2004 00:54:56]]> GMT</pubDate>
				<author><![CDATA[ Anonymous]]></author>
			</item>
			<item>
				<title>Thank you!</title>
				<description><![CDATA[ I found it VERY useful.  Thank you.<br /> Rick.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/2877/7639.php</guid>
				<link>https://proxy2.de/forum/posts/preList/2877/7639.php</link>
				<pubDate><![CDATA[Fri, 12 Mar 2004 16:26:40]]> GMT</pubDate>
				<author><![CDATA[ ricknlida]]></author>
			</item>
			<item>
				<title>Re: Making Changes To The Required Fields</title>
				<description><![CDATA[ [quote="Trevor"]<br /> 5 - Find the script in question.  The script that requires the Name field to be filled in is this (lines 13 to 17)...<br /> <br /> [code] if&#40;document.book.gb_name.value == &quot;&quot;&#41; &#123;<br />    alert&#40;&quot;$LANG&#91;ErrorPost1&#93;&quot;&#41;;<br />    document.book.gb_name.focus&#40;&#41;;<br />    return false;<br />  &#125;[/code]<br /> 6 - Delete it.<br /> [/quote]<br /> <br /> Don't delete it!<br /> Comment it out in case you want to put it back in.<br /> When you comment it out it will look like this---<br /> <br /> [code]// if&#40;document.book.gb_name.value == &quot;&quot;&#41; &#123;<br />    // alert&#40;&quot;$LANG&#91;ErrorPost1&#93;&quot;&#41;;<br />    // document.book.gb_name.focus&#40;&#41;;<br />    // return false;<br /> // &#125;[/code]<br /> <br /> Auron]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/2877/7643.php</guid>
				<link>https://proxy2.de/forum/posts/preList/2877/7643.php</link>
				<pubDate><![CDATA[Fri, 12 Mar 2004 17:32:25]]> GMT</pubDate>
				<author><![CDATA[ Auron]]></author>
			</item>
	</channel>
</rss>