}
add_filter( ‘gform_field_value_stuname’,‘get_firstname’,999, 1 );
`
It’s work fine and the “name” field filled automatically. The problem is that when I submit the form the “name” field will save empty!!
I didn’t find any way to solve this.
Can anyone help me?
Thank You
Yes, it’s working but I fetch more data from the database and show it in gravity. I use cimy user extra fields plugin to make some extra field in the registration form and I want to show it in gravity form. so the cimy plugin table is different from other plugins. for example, I wrote this code:
function get_phone_number($value){
$uid = get_current_user_id();
global $wpdb, $stdpunm;
$stdpunm = $wpdb->get_results("SELECT * FROM wp_cimy_uef_data WHERE USER_ID = $uid" );
return $stdpunm[2]->VALUE;
}
add_filter( 'gform_field_value_stupnumber','get_phone_number');