mercredi 15 juillet 2020

Multi Select / Check Boxes in Klipfolio

Im trying my luck here in stackoverflow as Klipfolio has no plan on developing this multi select feature.

Question: How to do a work around for multi select / check box in Klipfolio?

I have dived and asked around in klipfolio forum about this, found that the first question was asked in 2013 and in 2020 march, one of the Klipfolio head said there is no further plan to develop this feature in Klipfolio.

I tried using HTML Template feature + HTML/CSS/Javascript but Im stuck in 'how to pass the multiple selected values from HTML -> Javascript -> Klipfolio variable'

my code to build the multi select in HTML template:

HTML code:

<select style="width: 245px; height: 200px;" name="myFilter" id="myFilter" multiple>
    <option value="" disabled selected>Select fruit...</option>
    <option value="Apple">Apple</option>
    <option value="Orange">Orange</option>
    <option value="Banana">Banana</option>
    <option value="Mango">Mango</option>
    <option value="Grape">Grape</option>
</select>

Javascript Code: Note that #3dee6be9-3 is the id of my 'input-type' feature in klipfolio

$('#myFilter').change(function() {
  var selected_value2 = document.querySelector('#myFilter').value
  $('#3dee6be9-3').find(':input').val(selected_value2);
});

result: I can select multiple of them, but only 1 latest selected record is stored in 'input-type' fieldenter image description here

help or guide is very welcomed




Aucun commentaire:

Enregistrer un commentaire