Setting the Values in array and also in multi-select drop down check box
var valArr1="Hindi,Tamil";
var arr1 = valArr1.split(',');
for (var i = 0; i < valArr1.length; i++)
{
//The below code is used to set values in check box
$(".ms-options").multiselect("widget").find(":checkbox[value='" + arr1[i] + "']").attr("checked", "checked");
}
I have no option, how to set values (var valArr1="Hindi,Tamil" ) in button field
<div class="ms-options-wrap" style="position: relative;">
<button>[object Object]</button>
The below line shows value object object in Button field
<div class="ms-options-wrap" style="position: relative;">
<button>[object Object]</button>
<div class="ms-options" style="min-height: 200px; overflow: auto; display: block; max-height: 200px;">
<ul style="column-count: 1; column-gap: 0px;">
<li>
<label for="ms-opt-27" style="padding-left: 21px;">
<input type="checkbox" value="Hindi" title="Hindi" id="ms-opt-27" checked="checked">
Hindi
</label>
</li>
<li>
<label for="ms-opt-28" style="padding-left: 21px;">
<input type="checkbox" value="Tamil" title="Tamil" id="ms-opt-28" checked="checked">
Tamil
</label>
</li>
<ul>
</div>
I need solution please help me on this.
Aucun commentaire:
Enregistrer un commentaire