I am using this to populate a dropdown list with page titles.
add_filter('frm_setup_new_fields_vars', 'frm_populate_posts', 20, 2);
add_filter('frm_setup_edit_fields_vars', 'frm_populate_posts', 20, 2); //use this function on edit too
function frm_populate_posts($values, $field){
if($field->id == 84){ //change 84 to the ID of the field to populate
$posts = get_posts( array('post_type' => 'page', 'post_status' => 'publish', 'numberposts' => 999, 'orderby' => 'title', 'order' => 'ASC', 'exclude' => '1,1134,2,29,31,473,480,404,391,33,669,102,12,37,39,41,813,855,825,818,848,1109,1695,1104'));
$values['options'] = array(''); //change the options in a drop-down, check box, or radio field
foreach($posts as $p){
$values['options'][$p->ID] = $p->post_title;
}
$values['use_key'] = true; //this will set the field to save the post ID instead of post title
}
return $values;
}
What I would like to do is save a different value for each title that is not the id .. what I would like to save is
<a href="[post-url]" target="_blank">[post-title]</a>




May 14, 2012 at 11:20 am
Please refer to the codex.
http://codex.wordpress.org/Function_Reference/get_permalink
Topic closed.