Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Helen

Change Title to Text Area

Does anyone know which file within the plugin I’d need to edit to change the text field for title and for custom text fields to text area. Admin Columns uses Text Area for the Content column but not for title or others as far as I can tell. The reason that I want to do this is because it’s easier to see what I’m typing in the fields. Thanks in advance.

7 years, 12 months ago
Stefan van den Dungen Gronovius
Developer

Hi Helen,

Please don’t alter the code in the plugin, otherwise your changes will be lost after an update.
You can better make use of this filter to change the fields to textarea

https://www.admincolumns.com/documentation/filter-reference/cac-editable-editables_data/

You can run the filter for each column. I would advise to do a check if the type is not set or if it is a text field before you change it to textarea because you don’t want to change datepickers to textarea I suppose.

So you could do something like this (not tested):

function my_cac_editable_column_settings( $editable_data, $editable_model ) {

	if( ! $editable_data['type'] ){
		$editable_data['type'] = 'textarea';
	}

	if( 'text' == $editable_data['type'] ){
		$editable_data['type'] = 'textarea';
	}

	return $editable_data;
}
add_filter( 'cac/editable/editables_data', 'my_cac_editable_column_settings', 10, 2 );
7 years, 12 months ago

You must be logged in to reply to this topic.