<?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: Populating a field with a dynamic value</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Populating a field with a dynamic value</description>
<language>en</language>
<pubDate>Tue, 05 May 2026 07:54:32 +0000</pubDate>

<item>
<title>MXZRXP on "Populating a field with a dynamic value"</title>
<link>https://www.machform.com/forums/topic/populating-a-field-with-a-dynamic-value#post-14816</link>
<pubDate>Mon, 21 May 2012 09:14:31 +0000</pubDate>
<dc:creator>MXZRXP</dc:creator>
<guid isPermaLink="false">14816@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;seems like all these &#34;populating a field&#34; posts it says &#34;lets continue in email&#34;&#60;/p&#62;
&#60;p&#62;You could help a lot of folks (and save yourself much time) by posting here so other can see the solution.&#60;/p&#62;
&#60;p&#62;The &#34;personal&#34; approach is GREAT and don't stop it but post the results so everyone can see!&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Populating a field with a dynamic value"</title>
<link>https://www.machform.com/forums/topic/populating-a-field-with-a-dynamic-value#post-14460</link>
<pubDate>Mon, 23 Apr 2012 18:52:26 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">14460@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I've just replied to your support ticket. Let's continue there instead.
&#60;/p&#62;</description>
</item>
<item>
<title>almasco on "Populating a field with a dynamic value"</title>
<link>https://www.machform.com/forums/topic/populating-a-field-with-a-dynamic-value#post-14455</link>
<pubDate>Sun, 22 Apr 2012 21:16:27 +0000</pubDate>
<dc:creator>almasco</dc:creator>
<guid isPermaLink="false">14455@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I have a site that requires users to be logged in before accessing any forms. As part of each form, I have an element called User ID. I want to populate the element with the logged in user's id, which is stored in a session. I opened the view-functions.php file and placed the following code after line 4831.&#60;/p&#62;
&#60;p&#62;//Custom Code to populate User ID element with value from user id session.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;if($form_id == 1 &#38;#38;&#38;#38; $element[$j]-&#38;gt;id == 8)&#60;br /&#62;
{&#60;br /&#62;
	$element[$j]-&#38;gt;default_value = $_SESSION['jigowatt']['userid'];&#60;br /&#62;
}&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;When the form loads, the user id field is still empty. Please help.&#60;br /&#62;
//End of Custom code
&#60;/p&#62;</description>
</item>

</channel>
</rss>
