• Page:
  • 1

Tags Input in custom profile fields


Tags Input in custom profile fields

9 months, 1 week ago
Hi All,

If you want Tags Input Box in your uknowva's custom fields. And you are using an old version of uknowva. Which you can't update. You can use the follow the below mentioned steps to create Tags Input Box -

1. Create a tags.xml with following code -
<?xml version="1.0" encoding="utf-8"?>
		<param name="@spacer" type="spacer" default="" label="" description="" />
		<param name="size" type="text" default="" label="Size" description="" />
		<param name="style" type="text" default="" label="Style Attribute" description="" />
		<param name="class" type="text" default="" label="Additional class" description="" />

2. Create a tags.php with following code -
defined('_JEXEC') or die('Restricted access');

require_once (COMMUNITY_COM_PATH.DS.'libraries'.DS.'fields'.DS.'profilefield.php');
class CFieldsTags extends CProfileField
	public function getFieldHTML( $field , $required, $isDropDown = true)
		$selected = explode(',',$field->value);
		echo uKnowvaUI::tagsInput('field'.$field->id.'[]',$selected);
	public function formatdata($value)
		$finalvalue = array();
			foreach($value as $listValue){
				$finalvalue[] = $listValue;
		return implode(",",$finalvalue);	

3. Upload both these files in Path /public_html/components/com_community/libraries/fields and than open file customfields.xml. And just the add these below code under the fields section (<fields> tag) -
	<name>Tags List</name>

After these 3 steps you will see. Tags List type while you add new custom field.

Use this for increase tagging.

The following user(s) said Thank You: Vicky Jain, Neemit Shastri
  • Page:
  • 1

Upcoming Events

Who's Online