级联复选框/基于另一个复选框动态选择复选框 [英] Cascaded checkboxes/ dynamic selection of checkboxes based on another checkbox
问题描述
Hello Everyone,
我有一个要求,其中我有3个多选字段(显示为复选框)即 Region,PlantType和PlantName,在选择区域和PlantType时,应选择相应的植物名称。
示例:
地区:亚洲,欧洲,美洲
PlantType:A,B
PlantNames:Plant1,Plant2,Plant3,Plant4
常见列表
PlantNames       PlantType       地区
Plant1                     A                    亚洲
Plant2                     B                    亚洲
Plant3                     A                  欧洲
Plant4                     B                  America
条件:如果用户选择地区:亚洲和欧洲,PlantType:A。然后选择了PlantNames:plant1,plant3。
我目前正在使用SharePoint 2013.你能告诉我如何通过javascript或jquery实现这个目标吗?
谢谢
Mitz
Mitz Sanil
Hi Mitz,有两种选择。一个是InfoPath,但这是一个弃用的解决方案。
使用JavaScript / jQuery,我建议使用SPServices库:
https://social.technet.microsoft.com/wiki/contents/articles/37676.sharepoint-2013-cascade-dropdown-list-using-spservices-spservices-spcascadedropdowns.aspx
Hello Everyone,
I have a requirement, where in I have 3 multiple choice fields(displayed as checkboxes) namely Region, PlantType and PlantName, on selecting region and PlantType , corresponding plantnames should be selected.
Example:
Region: Asia, Europe, Americas
PlantType: A, B
PlantNames: Plant1, Plant2, Plant3, Plant4
common list
PlantNames PlantType Region
Plant1 A Asia
Plant2 B Asia
Plant3 A Europe
Plant4 B America
Condition: if user selects Region: Asia and Europe , PlantType: A . Then selected PlantNames :plant1,plant3.
I am currently using SharePoint 2013. Can you please advice me on how can I achieve this via javascript or jquery?
Thank you
Mitz
Mitz Sanil
Hi Mitz, there are two options. One would be InfoPath, but that's a deprecated solution.
Using JavaScript/jQuery, I recommend using the SPServices library:
https://social.technet.microsoft.com/wiki/contents/articles/37676.sharepoint-2013-cascade-dropdown-list-using-spservices-spservices-spcascadedropdowns.aspx
这篇关于级联复选框/基于另一个复选框动态选择复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!