简体   繁体   English

jQuery-更改类型=复选框,而不是在此代码中选择

[英]Jquery - change type = Checkbox instead of select in this code

I have this piece of code giving me a select dropdown with its label , 我有这段代码为我提供了一个带有其标签选择下拉菜单

LeaveRuleAdapter.method('getFormFields', function() {
    return [
            [ "employee_can_apply", {"label":"Employees can apply for this leave type","type":"select","source":[["Yes","Yes"],["No","No"]]}]
});

I have 2 questions, 我有两个问题

1. Is above codes are written on jquery or it's any jquery plugin ? 
2. Is there any way to include checkboxes insted of select.

( I'm a beginner in jquery, so dont mind if anything is wrong this question) (我是jquery的初学者,所以不要介意这个问题是否有误)

  1. It's not jQuery 不是jQuery

  2. I don't know the code, but you could try this: 我不知道代码,但是您可以尝试以下方法:

     LeaveRuleAdapter.method('getFormFields', function() { return [["employee_can_apply", {"label":"Employees can apply for this leave type","type":"checkbox"}]]}); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM