Support » Plugins » [Plugin: WordPress Form Manager] Conditions stop working after nicknames

  • Resolved bondiblueos9

    (@bondiblueos9)


    Conditions may fail when the field they test is given a nickname and there are more than one condition which tests the same field.

    I have a radio button list and two checkbox lists. I have two conditions set up. The first condition is to only show the first checkbox list if the first radio button is selected, and the second condition is to only show the second checkbox list if the second radio button is selected. This works as expected if the radio button list has no nickname. Once I give it a nickname, the second checkbox list appears and disappears appropriately, but the first checkbox list remains hidden. The behavior is as though I deleted the first condition or had changed first condition to always hide the first checkbox list. If I switch the order of the conditions, then the first checkbox list appears and disappears appropriately, but the second checkbox list remains hidden. The behavior is then as though I deleted the first condition or had changed first condition to always hide the first checkbox list. It does not matter if I give the checkbox lists nicknames or not, and the form works properly if I remove the nickname for the radio button list.

    It seems that in the working case when either radio button is clicked two javascript functions are called which execute the two conditions, but in the broken case only the function to execute the last condition is called.

    Here is the javascript produced for the working form:

    function cond_4f29db8ddada1(){
    var t0 = "";
     var list0 = document.forms['fm-form-7'].elements['custom_list-4f29d15ace89d'];
    for(var i=0; i<list0.length; i++){
    if(list0[i].checked) t0 = document.getElementById('custom_list-4f29d15ace89d-' + i + '-value').value;
    }
    var res = (t0 == 'Bright');
    document.getElementById('fm-item-custom_list-4f29d1b3b2ad2').style.display = res ? 'block' : 'none';
    }
    cond_4f29db8ddada1();
    function cond_4f29dc0905db6(){
    var t0 = "";
     var list0 = document.forms['fm-form-7'].elements['custom_list-4f29d15ace89d'];
    for(var i=0; i<list0.length; i++){
    if(list0[i].checked) t0 = document.getElementById('custom_list-4f29d15ace89d-' + i + '-value').value;
    }
    var res = (t0 == 'Dull');
    document.getElementById('fm-item-custom_list-4f29d1d0ab5c8').style.display = res ? 'block' : 'none';
    }
    cond_4f29dc0905db6();
    function fn_4f29e033bc105() {
    cond_4f29db8ddada1();
    cond_4f29dc0905db6();
    this.ph_hasEdit = true;
    }
    document.getElementById('custom_list-4f29d15ace89d-0').onclick = fn_4f29e033bc105;
    document.getElementById('custom_list-4f29d15ace89d-1').onclick = fn_4f29e033bc105;

    Note fn_4f29e033bc105() calls both cond_4f29db8ddada1() and cond_4f29dc0905db6()

    And here is the javascript produced for the non-working form:

    function cond_4f29db8ddada1(){
    var t0 = "";
     var list0 = document.forms['fm-form-7'].elements['custom_list-4f29d15ace89d'];
    for(var i=0; i<list0.length; i++){
    if(list0[i].checked) t0 = document.getElementById('custom_list-4f29d15ace89d-' + i + '-value').value;
    }
    var res = (t0 == 'Bright');
    document.getElementById('fm-item-custom_list-4f29d1b3b2ad2').style.display = res ? 'block' : 'none';
    }
    cond_4f29db8ddada1();
    function cond_4f29dc0905db6(){
    var t0 = "";
     var list0 = document.forms['fm-form-7'].elements['custom_list-4f29d15ace89d'];
    for(var i=0; i<list0.length; i++){
    if(list0[i].checked) t0 = document.getElementById('custom_list-4f29d15ace89d-' + i + '-value').value;
    }
    var res = (t0 == 'Dull');
    document.getElementById('fm-item-custom_list-4f29d1d0ab5c8').style.display = res ? 'block' : 'none';
    }
    cond_4f29dc0905db6();
    function fn_4f29e1218265a() {
    cond_4f29dc0905db6();
    this.ph_hasEdit = true;
    }
    document.getElementById('custom_list-4f29d15ace89d-0').onclick = fn_4f29e1218265a;
    document.getElementById('custom_list-4f29d15ace89d-1').onclick = fn_4f29e1218265a;

    Note fn_4f29e1218265a() only calls cond_4f29dc0905db6() and not cond_4f29db8ddada1()

    http://wordpress.org/extend/plugins/wordpress-form-manager/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WordPress Form Manager] Conditions stop working after nicknames’ is closed to new replies.