<?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: new password field</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: new password field</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 01:43:53 +0000</pubDate>

<item>
<title>Edken on "new password field"</title>
<link>https://www.machform.com/forums/topic/new-password-field#post-11715</link>
<pubDate>Mon, 28 Mar 2011 20:42:48 +0000</pubDate>
<dc:creator>Edken</dc:creator>
<guid isPermaLink="false">11715@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Awesome, thanks. :)
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "new password field"</title>
<link>https://www.machform.com/forums/topic/new-password-field#post-11711</link>
<pubDate>Mon, 28 Mar 2011 19:13:06 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">11711@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;It's pretty easy. Each form would have its own id number and the text field also having its own id number. All we need to do is to add the conditions.&#60;/p&#62;
&#60;p&#62;So let say you have three forms, you can change this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($_REQUEST[&#38;#39;id&#38;#39;] == 40 and $element-&#38;gt;id == 1){
	$field_type = &#38;#39;password&#38;#39;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;to become like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if(
($_REQUEST[&#38;#39;id&#38;#39;] == 40 and $element-&#38;gt;id == 1) or
($_REQUEST[&#38;#39;id&#38;#39;] == 41 and $element-&#38;gt;id == 3) or
($_REQUEST[&#38;#39;id&#38;#39;] == 42 and $element-&#38;gt;id == 4)
){
	$field_type = &#38;#39;password&#38;#39;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;simply change the above form id number and element id number based on your own forms.
&#60;/p&#62;</description>
</item>
<item>
<title>Edken on "new password field"</title>
<link>https://www.machform.com/forums/topic/new-password-field#post-11706</link>
<pubDate>Mon, 28 Mar 2011 01:23:58 +0000</pubDate>
<dc:creator>Edken</dc:creator>
<guid isPermaLink="false">11706@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Quick follow up question if I may...&#60;/p&#62;
&#60;p&#62;What if I want to run this on multiple forms? How would I change the code so it wasent just doing it with the one field on the one form?
&#60;/p&#62;</description>
</item>
<item>
<title>Edken on "new password field"</title>
<link>https://www.machform.com/forums/topic/new-password-field#post-11689</link>
<pubDate>Fri, 25 Mar 2011 20:35:06 +0000</pubDate>
<dc:creator>Edken</dc:creator>
<guid isPermaLink="false">11689@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;AWESOME!&#60;br /&#62;
Worked first time! &#60;/p&#62;
&#60;p&#62;MachForms is better than I could have possibly hoped!&#60;/p&#62;
&#60;p&#62;I keep thinking of different ways to use it. You rock!
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "new password field"</title>
<link>https://www.machform.com/forums/topic/new-password-field#post-11681</link>
<pubDate>Fri, 25 Mar 2011 13:20:10 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">11681@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi Ed,&#60;/p&#62;
&#60;p&#62;It's quite simple indeed.&#60;/p&#62;
&#60;p&#62;Let's take a look an example with this form:&#60;br /&#62;
&#60;a href=&#34;http://www.appnitro.com/forms/view.php?id=40&#34; rel=&#34;nofollow&#34;&#62;http://www.appnitro.com/forms/view.php?id=40&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The form above is having id number = 40&#60;br /&#62;
Our goal is to change the &#34;My Password Field&#34; textbox into a password field.&#60;/p&#62;
&#60;p&#62;First, right click on that form and view the HTML source of the form.&#60;br /&#62;
You'll see that &#34;My Password Field&#34; is having this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;input id=&#38;quot;element_1&#38;quot; name=&#38;quot;element_1&#38;quot; class=&#38;quot;element text medium&#38;quot; type=&#38;quot;text&#38;quot; value=&#38;quot;&#38;quot; /&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;this means that the field is having element id = 1&#60;/p&#62;
&#60;p&#62;Now, you need to edit your &#34;includes/view-functions.php&#34; file.&#60;br /&#62;
Search around line 40 for this block of code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$element_markup = &#38;lt;&#38;lt;&#38;lt;EOT
		&#38;lt;li id=&#38;quot;li_{$element-&#38;gt;id}&#38;quot; {$error_class}&#38;gt;
		&#38;lt;label class=&#38;quot;description&#38;quot; for=&#38;quot;element_{$element-&#38;gt;id}&#38;quot;&#38;gt;{$element-&#38;gt;title} {$span_required}&#38;lt;/label&#38;gt;
		&#38;lt;div&#38;gt;
			&#38;lt;input id=&#38;quot;element_{$element-&#38;gt;id}&#38;quot; name=&#38;quot;element_{$element-&#38;gt;id}&#38;quot; class=&#38;quot;element text {$element-&#38;gt;size}&#38;quot; type=&#38;quot;text&#38;quot; value=&#38;quot;{$element-&#38;gt;default_value}&#38;quot; /&#38;gt;
		&#38;lt;/div&#38;gt;{$guidelines} {$error_message}
		&#38;lt;/li&#38;gt;
EOT;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You need to change it to become like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$field_type = &#38;#39;text&#38;#39;;
if($_REQUEST[&#38;#39;id&#38;#39;] == 40 and $element-&#38;gt;id == 1){
	$field_type = &#38;#39;password&#38;#39;;
}
$element_markup = &#38;lt;&#38;lt;&#38;lt;EOT
		&#38;lt;li id=&#38;quot;li_{$element-&#38;gt;id}&#38;quot; {$error_class}&#38;gt;
		&#38;lt;label class=&#38;quot;description&#38;quot; for=&#38;quot;element_{$element-&#38;gt;id}&#38;quot;&#38;gt;{$element-&#38;gt;title} {$span_required}&#38;lt;/label&#38;gt;
		&#38;lt;div&#38;gt;
			&#38;lt;input id=&#38;quot;element_{$element-&#38;gt;id}&#38;quot; name=&#38;quot;element_{$element-&#38;gt;id}&#38;quot; class=&#38;quot;element text {$element-&#38;gt;size}&#38;quot; type=&#38;quot;{$field_type}&#38;quot; value=&#38;quot;{$element-&#38;gt;default_value}&#38;quot; /&#38;gt;
		&#38;lt;/div&#38;gt;{$guidelines} {$error_message}
		&#38;lt;/li&#38;gt;
EOT;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Just make sure to change the form id number and element id number above with your own id numbers.
&#60;/p&#62;</description>
</item>
<item>
<title>Edken on "new password field"</title>
<link>https://www.machform.com/forums/topic/new-password-field#post-11673</link>
<pubDate>Fri, 25 Mar 2011 02:22:47 +0000</pubDate>
<dc:creator>Edken</dc:creator>
<guid isPermaLink="false">11673@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi just got this and WOW, its amazing,&#60;br /&#62;
But I to need a password field on the form that users can add a password to and have the text obscured from sight.&#60;/p&#62;
&#60;p&#62;Just to be clear, I know I can password protect an entire form, but I want to just have one of the fields in a form obscured as a password box should be.&#60;/p&#62;
&#60;p&#62;I am told its a &#34;simple hack&#34; but if someone could post the steps and code needed I would be very grateful.&#60;/p&#62;
&#60;p&#62;Thanks in advance,&#60;/p&#62;
&#60;p&#62;Ed
&#60;/p&#62;</description>
</item>
<item>
<title>Mick on "new password field"</title>
<link>https://www.machform.com/forums/topic/new-password-field#post-9908</link>
<pubDate>Sun, 11 Jul 2010 05:16:57 +0000</pubDate>
<dc:creator>Mick</dc:creator>
<guid isPermaLink="false">9908@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;there is already a password field, for each form you create,
&#60;/p&#62;</description>
</item>
<item>
<title>anwarbashir on "new password field"</title>
<link>https://www.machform.com/forums/topic/new-password-field#post-9861</link>
<pubDate>Mon, 05 Jul 2010 17:53:16 +0000</pubDate>
<dc:creator>anwarbashir</dc:creator>
<guid isPermaLink="false">9861@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I would like to set the &#38;lt;input type = &#34;password&#34; name=&#34;passwd&#34;&#38;gt; but I am not sure how to code based on the condition of the name of the field being set to password, here is the code that I think I have to change can someone help?&#60;/p&#62;
&#60;p&#62;	//Single Line Text&#60;br /&#62;
	function display_text($element){&#60;/p&#62;
&#60;p&#62;		//check for error&#60;br /&#62;
		$error_class = '';&#60;br /&#62;
		$error_message = '';&#60;br /&#62;
		$span_required = '';&#60;br /&#62;
		$guidelines = '';&#60;/p&#62;
&#60;p&#62;		if(!empty($element-&#38;gt;is_error)){&#60;br /&#62;
			$error_class = 'class=&#34;error&#34;';&#60;br /&#62;
			$error_message = &#34;&#38;lt;p class=\&#34;error\&#34;&#38;gt;{$element-&#38;gt;error_message}&#38;lt;/p&#38;gt;&#34;;&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		//check for required&#60;br /&#62;
		if($element-&#38;gt;is_required){&#60;br /&#62;
			$span_required = &#34;&#38;lt;span id=\&#34;required_{$element-&#38;gt;id}\&#34; class=\&#34;required\&#34;&#38;gt;*&#38;lt;/span&#38;gt;&#34;;&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		//check for guidelines&#60;br /&#62;
		if(!empty($element-&#38;gt;guidelines)){&#60;br /&#62;
			$guidelines = &#34;&#38;lt;p class=\&#34;guidelines\&#34; id=\&#34;guide_{$element-&#38;gt;id}\&#34;&#38;gt;&#38;lt;small&#38;gt;{$element-&#38;gt;guidelines}&#38;lt;/small&#38;gt;&#38;lt;/p&#38;gt;&#34;;&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		//check for populated value, if exist, use it instead default_value&#60;br /&#62;
		if(isset($element-&#38;gt;populated_value['element_'.$element-&#38;gt;id]['default_value'])){&#60;br /&#62;
			$element-&#38;gt;default_value = $element-&#38;gt;populated_value['element_'.$element-&#38;gt;id]['default_value'];&#60;br /&#62;
		}
&#60;/p&#62;</description>
</item>
<item>
<title>Macoland on "new password field"</title>
<link>https://www.machform.com/forums/topic/new-password-field#post-5283</link>
<pubDate>Tue, 31 Mar 2009 06:35:18 +0000</pubDate>
<dc:creator>Macoland</dc:creator>
<guid isPermaLink="false">5283@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Can you share how you did that souda?
&#60;/p&#62;</description>
</item>
<item>
<title>souda on "new password field"</title>
<link>https://www.machform.com/forums/topic/new-password-field#post-4780</link>
<pubDate>Tue, 24 Feb 2009 04:31:06 +0000</pubDate>
<dc:creator>souda</dc:creator>
<guid isPermaLink="false">4780@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thanks a lot for the pointers! I have already modified display_text() function, it displays an input field as a password field if its title is &#34;Password&#34; or &#34;password&#34;. That takes care of the issue for now. As to the additional validation, I'll see if I can manage to make it work in process_form().&#60;/p&#62;
&#60;p&#62;Thanks again, and congratulations on a very nice piece of software.
&#60;/p&#62;</description>
</item>
<item>
<title>Petrus4 on "new password field"</title>
<link>https://www.machform.com/forums/topic/new-password-field#post-4778</link>
<pubDate>Tue, 24 Feb 2009 00:18:24 +0000</pubDate>
<dc:creator>Petrus4</dc:creator>
<guid isPermaLink="false">4778@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Yuniar,  Thanks for this great form builder!  Nice work (-:&#60;/p&#62;
&#60;p&#62;It would be great to have a password field added to the forms.  I read that  about 11 months ago you had added this to the feature requests here: &#60;a href=&#34;http://www.appnitro.com/forums/topic/password-field?replies=3&#34; rel=&#34;nofollow&#34;&#62;http://www.appnitro.com/forums/topic/password-field?replies=3&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;What is the time line for adding this feature to your product?
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "new password field"</title>
<link>https://www.machform.com/forums/topic/new-password-field#post-4777</link>
<pubDate>Mon, 23 Feb 2009 18:49:18 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">4777@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I'm afraid it would be quite difficult to add a new field type. It requires a lot of code across multiple files.&#60;/p&#62;
&#60;p&#62;I suggest to just hack the current function which display the text field to display password field based on certain condition.&#60;/p&#62;
&#60;p&#62;You need to modify &#34;includes/view-functions.php&#34; file, at the top you will find &#34;display_text()&#34; function. Adjust this function to display as password field.&#60;/p&#62;
&#60;p&#62;Regarding additional validation, if you need to compare two fields, you need to modify &#34;process_form()&#34; function in &#34;includes/post-functions.php&#34;.&#60;/p&#62;
&#60;p&#62;Add the code which do the checking there.&#60;br /&#62;
You can access the value of your form fields by using the &#34;$input&#34; array. Try dumping the content of this array to see what inside of it.
&#60;/p&#62;</description>
</item>
<item>
<title>souda on "new password field"</title>
<link>https://www.machform.com/forums/topic/new-password-field#post-4767</link>
<pubDate>Mon, 23 Feb 2009 14:43:19 +0000</pubDate>
<dc:creator>souda</dc:creator>
<guid isPermaLink="false">4767@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I have two questions:&#60;/p&#62;
&#60;p&#62;(1) I would like to add a new field type to the form which is not available in the form editor. This field is supposed to be password, so it should have type=&#34;password&#34; in the final form (entry replaced with dots when typed). And also, I would like it to have a unique field name in the table created for the form (I'm going to use it later, so it would be easier if it had a unique name). Could you please give me some advice where to start and which scripts to modify?&#60;/p&#62;
&#60;p&#62;(2) Is it possible to add additional validations for certain fields? For example, if I have a password field (see above) I would like to have a second password field next to the first one so a user is asked to retype the password. Then these two fields should match before the form is submited.&#60;/p&#62;
&#60;p&#62;Thanks a lot in advance...
&#60;/p&#62;</description>
</item>

</channel>
</rss>
