1. XWIKI Velocity: <select id="seleUserGroup" onchange="getSeleGroup(this);"> #foreach ($item in $list) #set($groupDoc= $xwiki.getDocument($item)) #set($groupName=$groupDoc.name) <option id="kbSeleGroup" name="kbSeleGroup" value="$item" #if("$!item" == "KBSharedArticlesCA") selected="selected" #end>$groupName</option> #end </select> 2. JavaScript <mce:script type="text/javascript"><!-- function getSeleGroup(){ var obj=document.getElementById('seleUserGroup'); var hidGroup=document.getElementById('KBClass.KBCategoriesClass_0_CategoryAdmin'); var index=obj.selectedIndex; hidGroup.value=obj.options[obj.selectedIndex].value; } // --></mce:script