Hello Admin, please review the coding of the combo-box. Currently the generated select ID and the hidden input ID are identical and therefore the value of the input is never updated. However, any small change in one of the IDs resolves the issue. Regards v
Test change made.
$html = '<select id="
_<%DOM_ID%>" name="<%INPUT_NAME%>"<%STYLE%><%CLASS%><%SELECTORS%>'
Changes to the "'formControl" value should also help to resolve the issue.without changes to jdom.
"'formControl' => '_ajxjform',"
Code @ \dom\html\form\input\select\combo.phpclass JDomHtmlFormInputSelectCombo extends JDomHtmlFormInputSelect
{
var $level = 5; //Namespace position : function
var $last = true; //This class is last call
var $canEmbed = true;
.
.
.
function build()
{
if ($this->groupBy)
$options = $this->buildOptionsGroup();
else
$options = $this->buildOptions();
if ($this->ui == 'chosen')
{
JDom::_('framework.jquery.chosen');
$this->addClass('chzn-select');
}
$html = '<select id="<%DOM_ID%>" name="<%INPUT_NAME%>"<%STYLE%><%CLASS%><%SELECTORS%>'
. ($this->size?' size="' . $this->size . '"':'') . '>' .LN
. $this->indent($this->buildDefault(), 1)
. $this->indent($options, 1)
. '</select>'. LN
. '<%VALIDOR_ICON%>'.LN
. '<%MESSAGE%>';
return $html;
}
.
.
.
}
Generated HTML
status\view.html.php/* Ajax List :
* Called from:
*/
$model = $this->getModel();
$items = $model->getItems();
$selected = (is_array($values))?$values[count($values)-1]:$values;
$event = 'jQuery("#jform_internalid").val(this.value);';
echo '<div class="ajaxchain-filter ajaxchain-filter-hz">';
echo '<div class="separator">';
echo JDom::_('html.form.input.select', array(
'dataKey' => 'internalid',
'dataValue' => $selected,
'formControl' => 'jform',
'labelKey' => 'image',
'list' => $items,
'listKey' => 'id',
'nullLabel' => 'COM_FILTER_NULL_STATUS_ITEM',
'selectors' => array(
'onchange' => $event
)
));
echo '</div>';
echo '</div>';
break;
Generated HTML contains:
<select id="
jform_internalid"
<input id="
jform_internalid"
<div class="controls">
<div id="_ajax_status_select11">
<div class="ajaxchain-filter ajaxchain-filter-hz">
<div class="separator">
<select onchange="jQuery("#jform_internalid").val(this.value);" name="jform[internalid]" id="jform_internalid">
<option value="">- status item -</option>
<option value="1">blue-marker.png</option>
<option selected="selected" value="2">yellow-marker.png</option>
<option value="3">green-marker.png</option>
</select>
</div>
</div>
</div>
<input type="hidden" value="" name="jform[internalid]" id="jform_internalid">
</div>