<?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 User Favorites: mschuyler</title>
		<link><a href='https://legacy.forums.gravityhelp.com/profile/mschuyler'>mschuyler</a></link>
		<description>Gravity Support Forums User Favorites: mschuyler</description>
		<language>en-US</language>
		<pubDate>Tue, 21 Apr 2026 13:50:37 +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/profile/" rel="self" type="application/rss+xml" />

		<item>
			<title>tushar on "Pre-select an option based on user data?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pre-select-an-option-based-on-user-data#post-299558</link>
			<pubDate>Mon, 03 Jun 2013 17:22:38 +0000</pubDate>
			<dc:creator>tushar</dc:creator>
			<guid isPermaLink="false">299558@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hey,&#60;br /&#62;
I am using buddypress and using gravity forms to fill-up those fields. (All works perfect and It’s really impressive)&#60;br /&#62;
 I have created specific user role (teacher, students…etc) on the registration page. Now once user login then- I want different profile field for different type of users.&#60;/p&#62;
&#60;p&#62;This can be possible with buddypress user account type pro (but it is something now working properly),&#60;br /&#62;
&#60;a href=&#34;http://wpbpshop.com/buddypress-user-account-type-pro&#34; rel=&#34;nofollow&#34;&#62;http://wpbpshop.com/buddypress-user-account-type-pro&#60;/a&#62; &#60;/p&#62;
&#60;p&#62;All I wanted to know – can I redirect user to complete the profile as per their roles with the help of gravity forms.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jorge ocampo on "Populate drop-down list with usernames"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-drop-down-list-with-usernames#post-237170</link>
			<pubDate>Sat, 04 May 2013 15:02:24 +0000</pubDate>
			<dc:creator>jorge ocampo</dc:creator>
			<guid isPermaLink="false">237170@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you chrishill123, this exactly what i was looking for!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Populate drop-down list with usernames"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-drop-down-list-with-usernames#post-95823</link>
			<pubDate>Mon, 26 Nov 2012 15:03:47 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">95823@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yeah, I saw your if statement and was like &#34;where did he define metas?&#34; Glad you got it sorted.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>chrishill123 on "Populate drop-down list with usernames"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-drop-down-list-with-usernames#post-95821</link>
			<pubDate>Mon, 26 Nov 2012 15:01:45 +0000</pubDate>
			<dc:creator>chrishill123</dc:creator>
			<guid isPermaLink="false">95821@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I AM STOOPID.  After debugging I realised I missed the 's' of 'metas'.&#60;/p&#62;
&#60;p&#62;Thanks for the reply.  Here is help for anyone else trying this.&#60;/p&#62;
&#60;p&#62;Here's an example of my fully working code to populate a dropdown box in Gravity forms with a list of user display names.&#60;/p&#62;
&#60;p&#62;Add this to functions.php&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;// This adds display names for all users to a drop down box on a gravity form.
add_filter(&#38;quot;gform_pre_render&#38;quot;, &#38;quot;populate_userdrop&#38;quot;);

//Note: when changing drop down values, we also need to use the gform_admin_pre_render so that the right values are displayed when editing the entry.
add_filter(&#38;quot;gform_admin_pre_render&#38;quot;, &#38;quot;populate_userdrop&#38;quot;);

function populate_userdrop($form){

    //only populating drop down for form id 1 - if editing this change to your own form ID
    if($form[&#38;quot;id&#38;quot;] != 1)

    return $form;

    //Creating item array.
    $items = array();
    // Get the custom field values stored in the array
	// If editing this lookup where you would like to get your data from
	// this example loads through all users of the website
    $metas = get_users();

if (is_array($metas))
{
// in this example we just load the display_name for each user into our drop-down field
foreach($metas as $meta)  $items[] = array(&#38;quot;value&#38;quot; =&#38;gt; $meta-&#38;gt;display_name, &#38;quot;text&#38;quot; =&#38;gt; $meta-&#38;gt;display_name);
}
    //Adding items to field id 1. Replace 1 with your actual field id. You can get the field id by looking at the input name in the markup.
    foreach($form[&#38;quot;fields&#38;quot;] as &#38;amp;$field)
        if($field[&#38;quot;id&#38;quot;] == 1){
            $field[&#38;quot;choices&#38;quot;] = $items;
        }

    return $form;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Populate drop-down list with usernames"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-drop-down-list-with-usernames#post-95820</link>
			<pubDate>Mon, 26 Nov 2012 15:00:35 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">95820@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Wait, did you figure this out? On your form, I see a dropdown with user names in it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>chrishill123 on "Populate drop-down list with usernames"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-drop-down-list-with-usernames#post-95817</link>
			<pubDate>Mon, 26 Nov 2012 14:49:48 +0000</pubDate>
			<dc:creator>chrishill123</dc:creator>
			<guid isPermaLink="false">95817@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Here's the code I'm working on in functions.php&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function populate_userdrop($form){

    //only populating drop down for form id 1
    if($form[&#38;quot;id&#38;quot;] != 1)

    return $form;

    //Creating item array.
    $items = array();
    // Get the custom field values stored in the array
    $meta = get_users();

if (is_array($metas))
{
foreach($metas as $meta)  $items[] = array(&#38;quot;value&#38;quot; =&#38;gt; $meta-&#38;gt;display_name, &#38;quot;text&#38;quot; =&#38;gt; $meta-&#38;gt;display_name);
}
    //Adding items to field id 1. Replace 1 with your actual field id. You can get the field id by looking at the input name in the markup.
    foreach($form[&#38;quot;fields&#38;quot;] as &#38;amp;$field)
        if($field[&#38;quot;id&#38;quot;] == 1){
            $field[&#38;quot;choices&#38;quot;] = $items;
        }

    return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;All I've done on the form is allowed it to be dynamically populated.&#60;/p&#62;
&#60;p&#62;Here's the form in action - &#60;a href=&#34;http://ethicalincubator.com/BMentor/form-test/&#34; rel=&#34;nofollow&#34;&#62;http://ethicalincubator.com/BMentor/form-test/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>chrishill123 on "Populate drop-down list with usernames"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/populate-drop-down-list-with-usernames#post-95808</link>
			<pubDate>Mon, 26 Nov 2012 14:03:50 +0000</pubDate>
			<dc:creator>chrishill123</dc:creator>
			<guid isPermaLink="false">95808@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;~I would like to be able to populate a drop down box with a list of all usernames&#60;br /&#62;
Possible?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Shelly on "Pre-select an option based on user data?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pre-select-an-option-based-on-user-data#post-48036</link>
			<pubDate>Wed, 01 Feb 2012 17:03:43 +0000</pubDate>
			<dc:creator>Shelly</dc:creator>
			<guid isPermaLink="false">48036@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Okay! I got it. it's not pretty, but it works.  Hope this helps someone else :)&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_pre_render_32&#38;#39;, &#38;#39;populate_sizing&#38;#39;);
function populate_sizing($form) {
	global $current_user;
	$userid = $current_user-&#38;gt;ID; // get user ID
	$usermeta = get_user_meta($userid); // get the user meta for current user
	$standard = unserialize($usermeta[&#38;#39;standard1&#38;#39;][0]); // this field is an array
	$custom = $usermeta[&#38;#39;custom1&#38;#39;][0]; // this field is input text

	foreach($form[&#38;#39;fields&#38;#39;] as &#38;amp;$field) {
		if($field[&#38;#39;type&#38;#39;] != &#38;#39;select&#38;#39; &#124;&#124; strpos($field[&#38;#39;cssClass&#38;#39;], &#38;#39;sizing&#38;#39;) === false) continue;

		$existing = $field[&#38;#39;choices&#38;#39;]; // grab the already-exisintg choices from the form
		$choices = array(); // set up the array

			foreach($existing as $item) {
				if($standard[0] != &#38;#39; &#38;#39;) {
					if($item[&#38;#39;text&#38;#39;] == &#38;#39;Standard&#38;#39;) $selected = &#38;#39;1&#38;#39;;
					if($item[&#38;#39;text&#38;#39;] != &#38;#39;Standard&#38;#39;) $selected = &#38;#39;&#38;#39;;
				} elseif($custom != &#38;#39;&#38;#39;) {
					if($item[&#38;#39;text&#38;#39;] == &#38;#39;Custom&#38;#39;) $selected = &#38;#39;1&#38;#39;;
					if($item[&#38;#39;text&#38;#39;] != &#38;#39;Custom&#38;#39;) $selected = &#38;#39;&#38;#39;;
				}
				// rewrite it so the choice set in the profile is selected and all others are not
				$choices[] = array(&#38;#39;text&#38;#39; =&#38;gt; $item[&#38;#39;text&#38;#39;], &#38;#39;value&#38;#39; =&#38;gt; $item[&#38;#39;value&#38;#39;], &#38;#39;isSelected&#38;#39; =&#38;gt; $selected);
			}

		// put the rewritten choices back in the form
		$field[&#38;#39;choices&#38;#39;] = $choices;
	}

	return $form;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Shelly on "Pre-select an option based on user data?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/pre-select-an-option-based-on-user-data#post-48026</link>
			<pubDate>Wed, 01 Feb 2012 15:20:47 +0000</pubDate>
			<dc:creator>Shelly</dc:creator>
			<guid isPermaLink="false">48026@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello all :)  The more I use Gravity Forms, the more I'm impressed with it.&#60;/p&#62;
&#60;p&#62;So I have yet another question.  Using &#60;a href=&#34;http://www.gravityhelp.com/forums/topic/right-parameter-names-to-pre-populate-the-names-fields&#34; rel=&#34;nofollow&#34;&#62;this tutorial&#60;/a&#62; I've managed to pre-populate a form field with custom data enteres in a logged-in users' profile.  (Basically, I created some extra user meta fields, and had them popped into the profile, and created a dropdown of choices in a form based on what the logged-in user has in those fields.  In this case, it's different addresses.  So if the user is logged in, the addresses in his profile are set as the options in the dropdown.)&#60;/p&#62;
&#60;p&#62;Now my question is this: can you create a form with options, and - using information placed in the usermeta - decide if those options are selected by default?  the current code I'm using simply rewrites the entire options list, but I dont' want to do that.  I just want to change the default selected item to whatever is set in the user's profile (if anything) - and revert to gravity Forms' selected default option if nothing is in t  users profile.&#60;/p&#62;
&#60;p&#62;Wow, I hope that make sense.&#60;/p&#62;
&#60;p&#62;As an example, this is the code where I'm pulling data from the profile to create a dropdown list of addresses:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_pre_render_32&#38;#39;, &#38;#39;populate_delivery_address_options&#38;#39;);
function populate_delivery_address_options($form) {
	foreach($form[&#38;#39;fields&#38;#39;] as &#38;amp;$field) {
		if($field[&#38;#39;type&#38;#39;] != &#38;#39;select&#38;#39; &#124;&#124; strpos($field[&#38;#39;cssClass&#38;#39;], &#38;#39;delivery_options&#38;#39;) === false) continue;
		$shipping = shipping_array();
		$choices = array(array(&#38;#39;text&#38;#39; =&#38;gt; &#38;#39;Please Choose an Address&#38;#39;, &#38;#39;value&#38;#39; =&#38;gt; &#38;#39; &#38;#39;) );
		foreach($shipping as $name =&#38;gt; $address) {
			$choices[] = array(&#38;#39;text&#38;#39; =&#38;gt; $name . &#38;#39;: &#38;#39; . $address, &#38;#39;value&#38;#39; =&#38;gt; $name . &#38;#39;: &#38;#39; . $address);
		}
		$field[&#38;#39;choices&#38;#39;] = $choices;
	}

	return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I suspect what I'm looking for is set in the $choices variable, but what I want to do is 1) grab the choices set in Gravity Forms form; 2) compare those choices against what's in the user's data; and 3) set one of the Gravity Form options as &#34;selected&#34; based on what's in the user's data.&#60;/p&#62;
&#60;p&#62;Is this possible, and if so, how would I do that?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>vixvii on "Allow forms to talk to one another"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/allow-forms-to-talk-to-one-another#post-28108</link>
			<pubDate>Sat, 18 Jun 2011 16:00:52 +0000</pubDate>
			<dc:creator>vixvii</dc:creator>
			<guid isPermaLink="false">28108@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;David, I am doing something similar - is there any chance of getting a screenshot of your forms?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
