backbone-forms with conditional fields

前端 未结 2 777
挽巷
挽巷 2021-01-05 16:27

First of all thanks to the guys of backbone-forms who made a tool which perfectly integrates in the backbone.js framework.

I\'m using backbone.js with the backbone-f

2条回答
  •  灰色年华
    2021-01-05 17:20

    There is no default implementation.In fact, completely on your own is also very simple, please reference the following code:

    //Pseudo code 
    var line = $("element_1"),area = $("element_2");
    if(selectvalue ==="1"){
      line.show();
      area.hide();
    }
    else{
      line.hide();
      area.show();
    }
    

提交回复
热议问题