<?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: How do I replace form field result with text?</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: How do I replace form field result with text?</description>
<language>en</language>
<pubDate>Sun, 03 May 2026 20:37:38 +0000</pubDate>

<item>
<title>MvdL79 on "How do I replace form field result with text?"</title>
<link>https://www.machform.com/forums/topic/how-do-i-replace-form-field-result-with-text#post-14885</link>
<pubDate>Fri, 25 May 2012 15:59:41 +0000</pubDate>
<dc:creator>MvdL79</dc:creator>
<guid isPermaLink="false">14885@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;By the way; in the old version of Machform (v2.3) this was done completely different?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($data[&#38;#39;element_type&#38;#39;] == &#38;#39;radio&#38;#39;){
	if($form_id == 3){
	if($data[&#38;#39;element_id&#38;#39;] == 8){

	if(trim($data[&#38;#39;value&#38;#39;]) == &#38;quot;Option #1&#38;quot;){
	$entry_details[$i][&#38;#39;value&#38;#39;] = &#38;quot;Swap option #1 with this example #1&#38;quot;;

	}elseif(trim($data[&#38;#39;value&#38;#39;]) == &#38;quot;Option #2&#38;quot;){
	$entry_details[$i][&#38;#39;value&#38;#39;] = &#38;quot;Swap option #1 with this example #2&#38;quot;;

	}elseif(trim($data[&#38;#39;value&#38;#39;]) == &#38;quot;Option #3&#38;quot;){
	$entry_details[$i][&#38;#39;value&#38;#39;] = &#38;quot;Swap option #1 with this example #3&#38;quot;;

	}elseif(trim($data[&#38;#39;value&#38;#39;]) == &#38;quot;Option #4&#38;quot;){
	$entry_details[$i][&#38;#39;value&#38;#39;] = &#38;quot;Swap option #1 with this example #4&#38;quot;;

	}elseif(trim($data[&#38;#39;value&#38;#39;]) == &#38;quot;Option #5&#38;quot;){
	$entry_details[$i][&#38;#39;value&#38;#39;] = &#38;quot;Swap option #1 with this example #5&#38;quot;;
			}
			}
	$template_values[$i] = $entry_details[$i][&#38;#39;value&#38;#39;];
	}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Or something like that....
&#60;/p&#62;</description>
</item>
<item>
<title>MvdL79 on "How do I replace form field result with text?"</title>
<link>https://www.machform.com/forums/topic/how-do-i-replace-form-field-result-with-text#post-14884</link>
<pubDate>Fri, 25 May 2012 14:55:18 +0000</pubDate>
<dc:creator>MvdL79</dc:creator>
<guid isPermaLink="false">14884@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Emailed again...?
&#60;/p&#62;</description>
</item>
<item>
<title>MvdL79 on "How do I replace form field result with text?"</title>
<link>https://www.machform.com/forums/topic/how-do-i-replace-form-field-result-with-text#post-14863</link>
<pubDate>Wed, 23 May 2012 20:52:34 +0000</pubDate>
<dc:creator>MvdL79</dc:creator>
<guid isPermaLink="false">14863@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Mailed.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "How do I replace form field result with text?"</title>
<link>https://www.machform.com/forums/topic/how-do-i-replace-form-field-result-with-text#post-14862</link>
<pubDate>Wed, 23 May 2012 20:42:08 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">14862@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Can you send me the modified file and let me know the URL to your form please? I'll check it.&#60;br /&#62;
&#60;a href=&#34;http://www.appnitro.com/contact&#34; rel=&#34;nofollow&#34;&#62;http://www.appnitro.com/contact&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>MvdL79 on "How do I replace form field result with text?"</title>
<link>https://www.machform.com/forums/topic/how-do-i-replace-form-field-result-with-text#post-14859</link>
<pubDate>Wed, 23 May 2012 20:08:12 +0000</pubDate>
<dc:creator>MvdL79</dc:creator>
<guid isPermaLink="false">14859@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Okay I tried it today, however for some reason it doesn't replace anything, but it justs posts the (original) text behind the radio button.&#60;/p&#62;
&#60;p&#62;I did the following:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;if($form_id == 1 &#38;#38;&#38;#38; $data[&#38;#39;element_type&#38;#39;] == &#38;#39;radio&#38;#39;){
switch ($data[&#38;#39;value&#38;#39;]) {
case &#38;#39;Yes, for sure&#38;#39;: $data[&#38;#39;value&#38;#39;] = &#38;#39;This should give a big thank you.&#38;lt;br&#38;gt;&#38;lt;br&#38;gt;&#38;#39;;break;
case &#38;#39;No, thank you&#38;#39;: $data[&#38;#39;value&#38;#39;] = &#38;#39;Another fine example for you...&#38;lt;br&#38;gt;&#38;lt;br&#38;gt;&#38;#39;;break;
case &#38;#39;This does not work&#38;#39;: $data[&#38;#39;value&#38;#39;] = &#38;#39;Arrrrrrggggggggggghhhhh....&#38;lt;br&#38;gt;&#38;lt;br&#38;gt;&#38;#39;;break;
}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;For some reason this doesn't replace text at all. If I select the radio button 'This does not work' it will parse 'This does not work' in the emailed form, instead of 'Arrrrrrggggggggggghhhhh'.&#60;/p&#62;
&#60;p&#62;I added the code below line 371 like you mentioned. Any ideas?
&#60;/p&#62;</description>
</item>
<item>
<title>MvdL79 on "How do I replace form field result with text?"</title>
<link>https://www.machform.com/forums/topic/how-do-i-replace-form-field-result-with-text#post-14842</link>
<pubDate>Tue, 22 May 2012 20:50:45 +0000</pubDate>
<dc:creator>MvdL79</dc:creator>
<guid isPermaLink="false">14842@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thanks for the replies Yuniar. Highly appreciated!&#60;/p&#62;
&#60;p&#62;Okay, I always thought less code was better. ;)
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "How do I replace form field result with text?"</title>
<link>https://www.machform.com/forums/topic/how-do-i-replace-form-field-result-with-text#post-14840</link>
<pubDate>Tue, 22 May 2012 20:47:07 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">14840@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;If you need to apply the code for multiple forms, I suggest to simply put another block as above with different id number.&#60;br /&#62;
Using 'OR' on this particular case might cause some problem when your forms has similar dropdown/multiple choice options.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "How do I replace form field result with text?"</title>
<link>https://www.machform.com/forums/topic/how-do-i-replace-form-field-result-with-text#post-14839</link>
<pubDate>Tue, 22 May 2012 20:44:58 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">14839@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;The above is actually for dropdown field. For multiple choice, the first line should be using this one:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($form_id == 7 &#38;#38;&#38;#38; $data[&#38;#39;element_type&#38;#39;] == &#38;#39;radio&#38;#39;){&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>MvdL79 on "How do I replace form field result with text?"</title>
<link>https://www.machform.com/forums/topic/how-do-i-replace-form-field-result-with-text#post-14832</link>
<pubDate>Tue, 22 May 2012 13:58:46 +0000</pubDate>
<dc:creator>MvdL79</dc:creator>
<guid isPermaLink="false">14832@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;This is for the multiple choice (radio buttons), right?&#60;/p&#62;
&#60;p&#62;And would you also be so kind to give me an example with the 'OR' command for multiple form ID's?&#60;br /&#62;
Less code is always better, right?
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "How do I replace form field result with text?"</title>
<link>https://www.machform.com/forums/topic/how-do-i-replace-form-field-result-with-text#post-14822</link>
<pubDate>Mon, 21 May 2012 22:34:13 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">14822@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;This still possible. You will need to edit your &#34;includes/helper-functions.php&#34; file.&#60;br /&#62;
Let say your form is having id number 7, search around line 371 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;right below that code, add this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($form_id == 7 &#38;#38;&#38;#38; $data[&#38;#39;element_type&#38;#39;] == &#38;#39;select&#38;#39;){
    switch ($data[&#38;#39;value&#38;#39;]) {
        case &#38;#39;Option #1&#38;#39;: $data[&#38;#39;value&#38;#39;] = &#38;#39;This is the example text for option #1&#38;#39;;break;
        case &#38;#39;Option #2&#38;#39;: $data[&#38;#39;value&#38;#39;] = &#38;#39;This is the example text for option #2&#38;#39;;break;
        case &#38;#39;Option #3&#38;#39;: $data[&#38;#39;value&#38;#39;] = &#38;#39;This is the example text for option #3&#38;#39;;break;
    }
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;that should do it.
&#60;/p&#62;</description>
</item>
<item>
<title>MvdL79 on "How do I replace form field result with text?"</title>
<link>https://www.machform.com/forums/topic/how-do-i-replace-form-field-result-with-text#post-14817</link>
<pubDate>Mon, 21 May 2012 14:33:27 +0000</pubDate>
<dc:creator>MvdL79</dc:creator>
<guid isPermaLink="false">14817@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;* bump *
&#60;/p&#62;</description>
</item>
<item>
<title>MvdL79 on "How do I replace form field result with text?"</title>
<link>https://www.machform.com/forums/topic/how-do-i-replace-form-field-result-with-text#post-14791</link>
<pubDate>Fri, 18 May 2012 17:02:11 +0000</pubDate>
<dc:creator>MvdL79</dc:creator>
<guid isPermaLink="false">14791@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Okay I upgraded a single license of Machform v3.2 to see if it's really an improvement. And to be honest, I am liking it so far.&#60;/p&#62;
&#60;p&#62;However I need somehting done, which could be done with Machform v2, so I am hoping this also can be done with v3.2. Hopefully someone can explain the following to me (and what I need to add and / or change in the current code).&#60;/p&#62;
&#60;p&#62;I have a pull-down field on my form, with the following options:&#60;/p&#62;
&#60;p&#62;Option #1&#60;br /&#62;
Option #2&#60;br /&#62;
Option #3&#60;br /&#62;
Option #4&#60;/p&#62;
&#60;p&#62;If I select 'Option #1' from the pull-down, it should replace this with the following text &#34;This is the example text for option #1.&#34; in the email which will be send. When selecting a different option, like 'Option #3' it should replace this text with &#34;This is a different example of text being displayed for option #3.&#34;.&#60;/p&#62;
&#60;p&#62;I will also need this text replacement option for the radio button (multiple choice) options.&#60;/p&#62;
&#60;p&#62;This was possible with Machform v2, so I am hoping this will also be available for Machform v3. So I am hoping Yuniar can tell me what to change or add in the current code.&#60;/p&#62;
&#60;p&#62;Also if everything goes well and works without problems, we will be upgrading our licence to an unlimited license once again.&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
