on 2018 Apr 26 4:24 AM
I'm using Hybris 6.2, I need to listen to the onchange event for the formSelectBox element.
I tried to modify it like this:
<div class="control">
<form:select id="${idKey}" path="${path}" cssClass="${selectCSSClass}" tabindex="${tabindex}" disabled="${disabled}" onchange="${onchange}">
<c:if test="${skipBlank == null || skipBlank == false}">
<option value="" disabled="disabled" ${empty selectedValue ? 'selected="selected"' : ''}>
<spring:theme code='${skipBlankMessageKey}'/>
</option>
</c:if>
<form:options items="${items}" itemValue="${not empty itemValue ? itemValue :'code'}" itemLabel="${not empty itemLabel ? itemLabel :'name'}"/>
</form:select>
</div>
And used it like this:
<formElement:formSelectBox idKey="address.district" labelKey="address.district2" path="district" selectCSSClass="form-control" mandatory="true" skipBlank="false" skipBlankMessageKey="address.district" items="${districts}" tabindex="7"
onchange="changedDistrict()" />
But when I try to access my page an error is displayed saying the attribute onchange is not valid.
Why is it not accepting the onchange attribute?
Request clarification before answering.
Hi Agustín,
Please ensure that you are modifying correct tag file (WEB-INF\tags\responsive\formSelectBox.tag).
Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.