<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: text in box</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: text in box</description>
<language>en</language>
<pubDate>Sun, 03 May 2026 23:28:47 +0000</pubDate>

<item>
<title>redityo on "[closed] text in box"</title>
<link>https://www.machform.com/forums/topic/text-in-box#post-11300</link>
<pubDate>Thu, 27 Jan 2011 18:44:39 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">11300@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Yes, you can use the if .. else .. like that to put each script on each form. And regarding not send a default value in mail notification, you need to edit &#34;includes/helper-functions.php&#34; file and go to line 330 for this code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;foreach ($entry_details as $data){&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;then put these code exactly bellow that line &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($form_id == 6) {
	//form 6 default value
	if ($data[&#38;#39;element_id&#38;#39;] == 1 and $data[&#38;#39;value&#38;#39;] == &#38;#39;name&#38;#39;) {
		$data[&#38;#39;value&#38;#39;] = &#38;#39;&#38;#39;;
	} elseif ($data[&#38;#39;element_id&#38;#39;] == 2 and $data[&#38;#39;value&#38;#39;] == &#38;#39;phone&#38;#39;) {
		$data[&#38;#39;value&#38;#39;] = &#38;#39;&#38;#39;;
	} if ($data[&#38;#39;element_id&#38;#39;] == 3 and $data[&#38;#39;value&#38;#39;] == &#38;#39;email&#38;#39;) {
		$data[&#38;#39;value&#38;#39;] = &#38;#39;&#38;#39;;
	}
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>Markstein on "[closed] text in box"</title>
<link>https://www.machform.com/forums/topic/text-in-box#post-11289</link>
<pubDate>Wed, 26 Jan 2011 08:58:17 +0000</pubDate>
<dc:creator>Markstein</dc:creator>
<guid isPermaLink="false">11289@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Also, is there a way to have the &#34;default values&#34; NOT sent in the emails. For example, if I have an optional single line text field called &#34;Best time to contact you&#34; and I use the method above so that the default value text is in the field it shows up in the emails with the text &#34;Best time to contact you&#34; if the user does not input anything.&#60;/p&#62;
&#60;p&#62;There must be some way to not have default values included in the emails?&#60;/p&#62;
&#60;p&#62;I plan on writing up a tutorial on this and perhaps you guys can sticky it once I have everything down.&#60;/p&#62;
&#60;p&#62;Mark
&#60;/p&#62;</description>
</item>
<item>
<title>Markstein on "[closed] text in box"</title>
<link>https://www.machform.com/forums/topic/text-in-box#post-11288</link>
<pubDate>Wed, 26 Jan 2011 05:09:20 +0000</pubDate>
<dc:creator>Markstein</dc:creator>
<guid isPermaLink="false">11288@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;oops, I posted the wrong code on the top. Unfortunately I cannot edit it. The top should have said:&#60;/p&#62;
&#60;p&#62;2. Go to around line 1832 ~ 1827, you will see these code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($has_calendar){
	$calendar_js = &#38;#39;&#38;lt;script type=&#38;quot;text/javascript&#38;quot; src=&#38;quot;js/calendar.js&#38;quot;&#38;gt;&#38;lt;/script&#38;gt;&#38;#39;;
}else{
	$calendar_js = &#38;#39;&#38;#39;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;put these code exactly below that code. One for form id17 and one for form id 33&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($form_id == 17) {
		$javascript_event = &#38;lt;&#38;lt;&#38;lt;EOT
&#38;lt;script type=&#38;quot;text/javascript&#38;quot; src=&#38;quot;js/jquery/jquery-core.js&#38;quot;&#38;gt;&#38;lt;/script&#38;gt;
&#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;
	function reset_field(element_id)
	{
		if ($(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;#39;name&#38;#39; &#124;&#124;
			$(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;#39;phone&#38;#39; &#124;&#124;
			$(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;#39;email&#38;#39;
			){

		$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;&#38;#39;);
			$(&#38;#39;#element_&#38;#39;+element_id).blur(function () {
				if ($(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;quot;&#38;quot;) {
					//set default value when lost focus
					switch (element_id) {
						case &#38;quot;1&#38;quot; :
							$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;name&#38;#39;);
							break;
						case &#38;quot;2&#38;quot; :
							$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;phone&#38;#39;);
							break;
						case &#38;quot;3&#38;quot; :
							$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;email&#38;#39;);
							break;
						default :
							$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;null&#38;#39;);
							break;
					}
				}
			});
		}
	}
&#38;lt;/script&#38;gt;
EOT;
}

if ($form_id == 33) {
		$javascript_event = &#38;lt;&#38;lt;&#38;lt;EOT
&#38;lt;script type=&#38;quot;text/javascript&#38;quot; src=&#38;quot;js/jquery/jquery-core.js&#38;quot;&#38;gt;&#38;lt;/script&#38;gt;
&#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;
	function reset_field(element_id)
	{
		if ($(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;#39;name&#38;#39; &#124;&#124;
			$(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;#39;phone&#38;#39; &#124;&#124;
			$(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;#39;email&#38;#39;
			){

		$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;&#38;#39;);
			$(&#38;#39;#element_&#38;#39;+element_id).blur(function () {
				if ($(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;quot;&#38;quot;) {
					//set default value when lost focus
					switch (element_id) {
						case &#38;quot;1&#38;quot; :
							$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;name&#38;#39;);
							break;
						case &#38;quot;2&#38;quot; :
							$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;phone&#38;#39;);
							break;
						case &#38;quot;3&#38;quot; :
							$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;email&#38;#39;);
							break;
						default :
							$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;null&#38;#39;);
							break;
					}
				}
			});
		}
	}
&#38;lt;/script&#38;gt;
EOT;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Is this correct?&#60;/p&#62;
&#60;p&#62;You can delete the above post if needed or modify it so people do not get confused.&#60;/p&#62;
&#60;p&#62;Mark
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "[closed] text in box"</title>
<link>https://www.machform.com/forums/topic/text-in-box#post-11284</link>
<pubDate>Tue, 25 Jan 2011 19:20:27 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">11284@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi Mark,&#60;/p&#62;
&#60;p&#62;You need to add &#34;blur&#34; ( lost focus) event to the field indeed. To do this, you can change these code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($form_id == 17) {
		$javascript_event = &#38;lt;&#38;lt;&#38;lt;EOT
&#38;lt;script type=&#38;quot;text/javascript&#38;quot; src=&#38;quot;js/jquery/jquery-core.js&#38;quot;&#38;gt;&#38;lt;/script&#38;gt;
&#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;
	function reset_field(element_id)
	{
		if ($(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;#39;name&#38;#39; &#124;&#124;
			$(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;#39;phone&#38;#39; &#124;&#124;
			$(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;#39;email&#38;#39;
			){

		$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;&#38;#39;);

		}
	}
&#38;lt;/script&#38;gt;
EOT;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;into &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($form_id == 17) {
		$javascript_event = &#38;lt;&#38;lt;&#38;lt;EOT
&#38;lt;script type=&#38;quot;text/javascript&#38;quot; src=&#38;quot;js/jquery/jquery-core.js&#38;quot;&#38;gt;&#38;lt;/script&#38;gt;
&#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;
	function reset_field(element_id)
	{
		if ($(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;#39;name&#38;#39; &#124;&#124;
			$(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;#39;phone&#38;#39; &#124;&#124;
			$(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;#39;email&#38;#39;
			){

		$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;&#38;#39;);
			$(&#38;#39;#element_&#38;#39;+element_id).blur(function () {
				if ($(&#38;#39;#element_&#38;#39;+element_id).val() == &#38;quot;&#38;quot;) {
					//set default value when lost focus
					switch (element_id) {
						case &#38;quot;1&#38;quot; :
							$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;name&#38;#39;);
							break;
						case &#38;quot;2&#38;quot; :
							$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;phone&#38;#39;);
							break;
						case &#38;quot;3&#38;quot; :
							$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;email&#38;#39;);
							break;
						default :
							$(&#38;#39;#element_&#38;#39;+element_id).val(&#38;#39;null&#38;#39;);
							break;
					}
				}
			});
		}
	}
&#38;lt;/script&#38;gt;
EOT;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That would make your default field text appear when lost focus and do not have any entry.&#60;br /&#62;
Don't forget to change the element id with yours.
&#60;/p&#62;</description>
</item>
<item>
<title>Markstein on "[closed] text in box"</title>
<link>https://www.machform.com/forums/topic/text-in-box#post-11281</link>
<pubDate>Tue, 25 Jan 2011 08:20:17 +0000</pubDate>
<dc:creator>Markstein</dc:creator>
<guid isPermaLink="false">11281@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi redityo,&#60;/p&#62;
&#60;p&#62;I think that post may need to be updated. I followed it step by step and the text indeed does appear in the field and also disappears when you click in the field, however, when you click somewhere else the default text does not reappear automatically.&#60;/p&#62;
&#60;p&#62;Mark
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "[closed] text in box"</title>
<link>https://www.machform.com/forums/topic/text-in-box#post-11158</link>
<pubDate>Tue, 04 Jan 2011 18:11:56 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">11158@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;This can be done by customizing machform files. To do this, you can use the method that posted in here :&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.appnitro.com/forums/topic/showing-default-values-that-disappear-once-a-user-clicks-in-the-field?replies=5#post-7011&#34; rel=&#34;nofollow&#34;&#62;http://www.appnitro.com/forums/topic/showing-default-values-that-disappear-once-a-user-clicks-in-the-field?replies=5#post-7011&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>viewscope on "[closed] text in box"</title>
<link>https://www.machform.com/forums/topic/text-in-box#post-11153</link>
<pubDate>Tue, 04 Jan 2011 09:53:57 +0000</pubDate>
<dc:creator>viewscope</dc:creator>
<guid isPermaLink="false">11153@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Can you have the text already in the field box? Like &#34;Name&#34; when you click in the box where &#34;NAME&#34; is the text disappears. When you click off of it it re appears again.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
