If it is a dropdown and you want to populate it with options may be use this filter
add_filter("gform_predefined_choices", "add_predefined_choice");
function add_predefined_choice($choices){
$choices["My New Choice"] = array("Choice 1", "Choice 2", "Choice 3");
return $choices;
}
http://www.gravityhelp.com/documentation/page/Gform_predefined_choices
gform_field_value_selection filter is for default value.
Give a look here http://www.gravityhelp.com/documentation/page/Developer_Docs
See if this works..
add_filter("gform_field_value_selection", "populate_selection");
function populate_selection ($value) {
$favs = wpfp_get_users_favorites();
$list = array();
foreach ($favs as $fav){
$list[] = get_the_title($fav);
}
return $list;
}
Related Posts:
- Help debugging PHP filter for wordpress [closed]
- Shortcodes — Using add_action, add_filter in the shortcode
- How to remove medium size class in gravity form for input tag?
- WooCommerce Custom Product Validation [closed]
- Changing WooCommerce Display Price Based on User Role & Category [closed]
- Not able to change wp_title using add_filter
- How to hook a filter to catch get_post_meta when alternate a custom field output?
- Changing JPEG compression depending on image size
- Advanced Custom Fields and Yoast SEO keyword analysis [closed]
- Insert Custom HTML After Shortcode
- Is there a way to add another row to the tinyMCE kitchen sink toggle?
- What do add_filters() and apply_filter() do?
- add_filter to youtube embeds?
- SSL certificate for the host could not be verified
- Store source permalink on XMLRPC calls
- What to use instead of the content_save_pre filter?
- How to limit the pages displayed for choosing parent page on page attribute’s menu?
- How can I customize the wp_list_categories
- How can I reliably and globally disable wptexturize?
- Customise Jetpack Publicize text
- Can’t change a label in woocommerce with the normal filter
- WordPress RSS feed – filter RSS content by custom field value
- What is the filter hook for custom fields content?
- Filter keywords from search query
- Add classname to the_category() function?
- Filter the URL of next_posts_link & previous_posts_link
- Exclude One Category and its Subcategories using WP_LIST_FILTER
- Explanation for remove_filter used in the below code [closed]
- How to change the blog title with add_filter? details below
- How To Get User Data in Callback Function for pre_user_nicename?
- Gutenberg disable the “block” tab in right sidebar
- add_filter to ‘woocommerce_before_main_content’ [closed]
- Editing
- the_content filter – checking the post
- add_filter to apply_filters that exists within class
- Which built-in WordPress files are safe to edit?
- Echoing Categories only if they’re a child of a given category
- How do I target a single page to modify the comment form of only that page?
- Adding a title prefix with the the_title filter
- How to removes all instances of thumbnails displayed in my theme?
- Contact Form 7 filter similar to preprocess_comment [closed]
- How to modify an existing meta description?
- Adding TinyMCE buttons without removing plugin buttons?
- Display Externally Retrieved Data within a Custom Template
- Can the wordpress color palettes by changed through Javascript?
- Filter on the_content doesn’t update the content being searched via register_rest_route
- Where to add_filter in theme functions.php?
- tag removed not using a filter
- How to customize the “Insert/edit link” popup box?
- How to filter backend post list showing only posts having a shortcode
- WordPress Image update filter
- How do I override the_excerpt so that it will display full content?
- Why does WordPress strip custom HTML that are form elements and theme SVG icons?
- Get current user data
- How can you wrap add_filter with a if is_home() statement?
- How to add attributes to WordPress Admin Sub Menu List Items
- How to combine multiple body classes
- How to replace username with email address in users table
- How to write a filter to remove a form field (WordPress) [closed]
- Why doesn’t this function work when I know that the IP Address is “true”?
- why require – does not load filter
- term_link filter rewrite link only applying half of condition?
- How to change dynamically page title according to variable data?
- Map plugin with proximity search compatible with Buddypress
- Create a pre-filtered version of the Media Library
- What is the action hook to use if you want to capture the new password during password change?
- Get_template_part inside filter?
- How to filter Sidebar Content
- Removing URL and adding container around image in the featured image metabox
- How would I use a filter to remove header banner on certain post types
- Need to return shortcode text instead of the output
- Finding actual functions added to hooks and filters
- Buddypress Filter Multiple Activities [closed]
- How to apply filter on get_the_post_thumbnail()
- How do I check if I can use the allowed_block_types filter?
- Setting the page title in a plugin, but not outside my plugin
- Security question – Display a General Custom Login Error Message
- Action for opening attachment or manipulating all attachment links
- Filter wp_mail based on content type
- Remove the post_content search from WHERE clause (and CONCAT sql function)
- mu-plugins body_class filter not working
- How to apply a filter to everything?
- WP Job Manager – display search results from custom search form in taxonomy-job_listing_category page
- Conditionally (cpt) filter previous and next_post_link
- Post filter Month dropdown at front-end like wordpress backend
- shortcode function outputs multiple anchor tags
- changing size image within the content
- WP Dashboard -> Posts-> Filter by Category -> Form Method Change : Which Hook
- Show child theme for users on specific IP
- wp.getPosts with status = ‘trash’ using node.js
- Is there a way to overwrite a filter used in canonical.php?
- How do I remove certain HTML elements with specific classes from the feed?
- How can I display wp_link_pages before a shortcode, if it is used, or display after content?
- confusion with add_filter
- post->post_content filter
- How to change this WP logo and posts url in block editor?
- Replacing text using add_filter
- Background color and background image below element in Contact Form 7 – error tip [closed]
- Change password reqts with NO plugin without breaking resetpass link?
- How can I conditionally add the filter option_home?