-
Notifications
You must be signed in to change notification settings - Fork 3
Dropdown box fields problems #11
Comments
I don't understand, could you please describe it better or give more information? Thank you |
Ah yes that I know, unfortunately it is so for the moment, because it trims the spaces when entering the value in the item editor. Can you use |
Yes, with |
Hello!! How I can use multiple dropdown for select several values? |
Hi mittus! Unfortunately, we currently have no way to accomplish this. You can use a chunk field or write your own field type that allows it. With a chunk field it should be relatively easy, for example:
<div class="fieldarea">
<label for="multiple_dropdown">Select Multiple</label>
<div class="field-wrapper">
<select id="selectMultiple" multiple>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
</div>
</div>
<script>
$(function() {
var values = $("#cars").val();
$.each(values.split(","), function(i,e){
$("select#selectMultiple option[value='" + e + "']").prop("selected", true);
});
$("select#selectMultiple").change(function(e) {
var selected = $(e.target).val();
$("#cars").val(selected);
console.log($("#cars").val())
});
});
</script> Sometime I will extend ItemManager with the new field, unfortunately I don't have time for it now ;-) |
Hello! I need use my own field. Now trying create multiple field. If you have example, give me please. Thank You!! |
Here are the files you can duplicate and customize: Since these fields also implement And you still have to adjust your backend template file You can also find more information here: https://ehret-studio.com/articles/itemmanager/itemmanager-fieldtypes/ Good luck! ;-) |
If I save empty values with spase (not a
), in the items, when I try save them, I see error "Invalid value format for the Fieldtype"The text was updated successfully, but these errors were encountered: