<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Default/Dynamic Value for Time</title>
		<link>https://legacy.forums.gravityhelp.com/topic/defaultdynamic-value-for-time</link>
		<description>Gravity Support Forums Topic: Default/Dynamic Value for Time</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 02:51:01 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/defaultdynamic-value-for-time" rel="self" type="application/rss+xml" />

		<item>
			<title>ktrusak on "Default/Dynamic Value for Time"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/defaultdynamic-value-for-time#post-82412</link>
			<pubDate>Sat, 20 Oct 2012 13:41:26 +0000</pubDate>
			<dc:creator>ktrusak</dc:creator>
			<guid isPermaLink="false">82412@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes, that worked perfectly. Thank you for your help I don't think I would have figured that out, I was way off
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Default/Dynamic Value for Time"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/defaultdynamic-value-for-time#post-82125</link>
			<pubDate>Thu, 18 Oct 2012 22:43:30 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">82125@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You're making things harder on yourself than necessary.  You can check the  &#34;Allow field to be populated dynamically&#34; box on the advanced tab for your field, and give it a parameter name (i.e. my-time-field). Then use the following:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;[php]
add_filter(&#38;#39;gform_field_value_my-time-field&#38;#39;, &#38;#39;populate_time&#38;#39;);
function populate_time($value) {
    return &#38;quot;11:30am&#38;quot;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Does that work for you?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ktrusak on "Default/Dynamic Value for Time"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/defaultdynamic-value-for-time#post-81864</link>
			<pubDate>Wed, 17 Oct 2012 22:34:23 +0000</pubDate>
			<dc:creator>ktrusak</dc:creator>
			<guid isPermaLink="false">81864@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Okay great, thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Default/Dynamic Value for Time"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/defaultdynamic-value-for-time#post-81863</link>
			<pubDate>Wed, 17 Oct 2012 22:33:49 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">81863@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I've asked the developers for their feedback on this one.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ktrusak on "Default/Dynamic Value for Time"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/defaultdynamic-value-for-time#post-81830</link>
			<pubDate>Wed, 17 Oct 2012 20:41:09 +0000</pubDate>
			<dc:creator>ktrusak</dc:creator>
			<guid isPermaLink="false">81830@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Is it possible to insert a default value for a time field? I couldn't find any docs on this. &#60;/p&#62;
&#60;p&#62;I tried an array:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_pre_render_6&#38;#39;, &#38;#39;populate_each_product_reserve&#38;#39;);
function populate_each_product_reserve ($form){
   $choices2 = array(
                    array(&#38;quot;text&#38;quot; =&#38;gt; &#38;quot;HH&#38;quot;, &#38;quot;value&#38;quot; =&#38;gt; &#38;#39;6&#38;#39;),
                    array(&#38;quot;text&#38;quot; =&#38;gt; &#38;quot;HH&#38;quot;, &#38;quot;value&#38;quot; =&#38;gt; &#38;#39;00&#38;#39;),
                    );

    $inputs2 = array(
                    array(&#38;quot;label&#38;quot; =&#38;gt; &#38;quot;HH&#38;quot;, &#38;quot;id&#38;quot; =&#38;gt; 4.1),
                    array(&#38;quot;label&#38;quot; =&#38;gt; &#38;quot;MM&#38;quot;, &#38;quot;id&#38;quot; =&#38;gt; 4.2),
                );

        foreach($form[&#38;quot;fields&#38;quot;] as &#38;amp;$field){
           if($field[&#38;quot;id&#38;quot;] == 4){
            $field[&#38;quot;value&#38;quot;] = $choices2;
            $field[&#38;quot;inputs&#38;quot;] = $inputs2;
            }
        }

    return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I have tried some variations of the input and value labels for the array, but couldn't get it to go through. Any ideas?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
