根据在另一个查找字段中选择的值,使用某些查找值填充字段!

问题描述:

我通过sharepoint list创建项目,在newform中我有一个类型为lookup的字段。根据所选的查找字段值,必须填充其他查找字段值。



例如:L1的值为a,b,c,d

L2的值为1,2,3,4,5,6

如果我选择L1值为'a',那么L2应该只显示1,2。

如果我选择L2值为'b',那么L2应该只显示3,4 ..所以..on。



请建议它怎么样完成最小的自定义,如JavaScript ..



提前谢谢!!

I am creating projects through sharepoint list and in the newform i have a fields which of type lookup. based on the selected value of lookup field the other lookup fields values has to be populated.

Ex: L1 has values a,b,c,d
L2 has values 1,2,3,4,5,6
if i select the L1 values as 'a' then L2 should display only 1,2.
if i select the L2 value as 'b' then L2 should display only 3,4.. so..on.

Please suggest how can it be done with minimal customization like JavaScript..

Thanks in advance!!

这是简化的示例(你需要jQuery,但它可以不用):

Here is simplified sample (you need jQuery for this, but it can be done without):


document )。ready( function (){
// 如果未选择BranchAmbassador,则隐藏源
var
(document).ready(function () { // hide source if BranchAmbassador not selected var


所以urce =