All Topics
acp/editing/view_settings
I have a custom field radio button in edit user and would like this to be editable on the user list as a dropdown. I have used the following code.
/**
* Change inline eit for a specific custom field to a prefilled drop down
*
* @param $data array
* @param $column AC_Column
*
* @return mixed
*/
function my_acp_custom_field_editing_selectbox( $data, $column ) {
if ( $column instanceof ACP_Column_CustomField ) {
if ( 'fees-paid' === $column->get_meta_key() ) {
$data['type'] = 'select';
$data['options'] = array(
'yes' => 'Yes',
'no' => 'No',
);
}
}
return $data;
}
add_filter( 'acp/editing/view_settings', 'my_acp_custom_field_editing_selectbox', 10, 2 );
This is working fine on my test site but on the live site which has the latest version of your plugin it’s not working.
In the edit columns settings I have chosen the field as excerpt and inline editing as text.
You must be logged in to reply to this topic.