This topic is locked

How do I validate 3 dropdown fields not to have same values

6/22/2017 2:50:14 PM
PHPRunner General questions
P
phppinoy author

How do I validate 3 dropdown fields not to have same values?
I want to use this JS code but don't know how to change phprunner field html name.
$('select[name="name[]"]').change(function() {

var myName = '[name="name[]"]';

var myOpt = [];

$("select"+ myName).each(function () {

myOpt.push($(this).val());

});

$("select"+ myName).each(function () {

$(this).find("option").prop('hidden', false);

var sel = $(this);

$.each(myOpt, function(key, value) {

if((value != "") && (value != sel.val())) {

sel.find("option").filter('[value="' + value +'"]').prop('hidden', true);

}

});

});

});

A
amins 6/22/2017
... how to change phprunner field html name.



You must change the field names from the modify table in PHPRunner.