Development of custom field type

9 years 10 months ago #223115 by obm

I'm currently developing a comprofiler plugin in addition to a native joomla component. I basically need a custom field type to show in the user profile. It also needs to be searchable in the user list.

The field value is not editable, but depends on some other profile fields and information from the joomla component.

After reviewing some existing plugins, I tried to extend the cbFieldHandler class:
$_PLUGINS->registerUserFieldTypes(array('myfield' => 'CBfield_myfield'));

class CBfield_myfield extends cbFieldHandler {

	function getField( &$field, &$user, $output, $reason, $list_compare_types ) {
		return "MyField";

Additionally, I added a fieldtypes section to the plugin manifest:
	<field type="myfield" label="A custom field"></field>

Unfortunately the new field doesn't show up in comprofiler backend and can't be added to any tab. Does anyone know what's missing?


Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.146 seconds

Facebook Twitter LinkedIn