Answer the question
In order to leave comments, you need to log in
DLE - how to change the dropdown list from the additional field [yes, no]?
Good day to all, there is such a question on CMS DLE 13.2 (the latest at the moment)
I have an additional field for the news field type: Drop-down list yes, no,
in general, in my template in addnews.tpl I want to change the appearance of the output of this list
specifically, I want to make regular checkboxes instead of a drop-down list,
I know how to select a specific category through the checkbox in addnews.tpl
in this case, if the checkbox is in the checked position, then category 5 will be attached to the news:
<input type="checkbox" name="catlist[]" value="5"> Premium
<script>
$(function(){
$(".xfgender option").each(function(i){
if($(this).prop('value')==$("#gender_val").text()) $(this).prop('selected',true);
})
})
</script>
<div id="gender_val">[xfinput_gender]</div>
<select name="xfield[gender]" class="xfgender" id="xfield[gender]">
<option value="0">Мужской</option>
<option value="1">Женский</option>
</select>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question