custom fieldtype 'set' callback failed

custom fieldtype 'set' callback failed

jeanyeajeanyea Posts: 1Questions: 1Answers: 0

it just run only once on the table editor, without any responding after that.
if replace or split removed, then it works.
and the custom filetype is a multiple select.

            "set": function ( conf, val ) {

                if(val=='' || val=='-1'){
                    $(conf._input).val(-1);
                    }else{
                            $(conf._input).find('option[value="-1"]').prop('selected',false);

                            val = val.replace(' ','');
                            val = val.replace('0,','');

                            $.each(val.split(','),function(i,v){
                                $(conf._input).find('option[value="'+ v +'"]').prop('selected',true);   
                                });

                        }
            },

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Do you get any Javascript errors on your browser's console? Are you able to link me to the page where you are using your custom plug-in so I can debug it a bit?

    Thanks,
    Allan

This discussion has been closed.