表单根据下拉菜单中的选择进行更改 [英] Form changes based on selection from drop down

查看:88
本文介绍了表单根据下拉菜单中的选择进行更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我为内部IT管理团队工作,我们希望为SharePoint 2013网站中以列表形式存储的所有资产建立记录.我将创建一个数据库来存储我们的硬件及其所有规格.例如. PC名称,内存,RAM.

I work for internal IT administration team and we're looking to set up a record of all our assets stored in list form in our SharePoint 2013 site. I'll be creating a database to store our hardware and all of their specs; eg. PC names, memory, RAM. 

我是SharePoint的新手,只知道如何做相对基本的事情,因此为什么我以列表形式存储此信息.

I'm a SharePoint novice and only know how to do relatively basic things, hence why I'm storing this info in list form. 

在我的表单中,有一个下拉菜单名为资产类型"它将指定资产是台式机,笔记本电脑还是打印机等.

In my form, there's a drop down titled "Asset type" which will specify whether the asset is a Desktop, Laptop, Printer etc. 

由于此表格中显示的所有字段都与打印机或交换机无关,所以我理想的情况是-根据在中选择的资产类型,出现/消失一组不同的字段下降.因此,将其切换到桌面将 显示相关字段,然后将其更改为"Router"可能会显示一组完全不同的字段,我可以将其配置为与路由器属性相关.

Because all of the fields shown in this form aren't relevant to say, a printer or switch, what I'd ideally like to have is  a different set of fields appear/disappear based on the asset type selected in that drop down. So, switching it to Desktop would show the relevant fields, and then changing it to "Router" may display a completely different set of fields that I can configure to be relevant to router properties. 

任何人都可以给我任何指示,说明我将如何去做吗?非常感谢您的帮助.

Can anyone give me any indication on how I'd go about doing this? Any help is much appreciated. 

我试图附加一张图片以向您展示我目前所拥有的,但是它说我需要首先验证我的帐户.

I tried to attach an image to show you what I've currently got, but it said I needed to verify my account first.

非常感谢,

Rob 

Rob 

推荐答案

您可以考虑使用这种方法来实现相同的目的:

You can consider this approach for achieving the same:

1)使用所有字段创建表单.

1) Create your form with all fields.

2)最初隐藏所有字段,但下拉列表和其他必填字段除外.

2) Hide all the fields initially except your Dropdown and other required fields.

3)根据下拉值的选择,您可以显示所需的字段集.

3) Based on selection of dropdown value you can show the set of fields that you want.

以下是一些URL供进一步参考:

Following are some URL's for further reference:

http://sharepoint-mattharmon.blogspot.sg/2013/02/hiding-fields-in-infopath-2010_21.html

http://social.msdn.microsoft.com/Forums/sharepoint/zh-CN/4c366cd9-dd84-440c-bdbc-30ee2c81876e/conditionally-hide-a-field-in-a-custom-form-using-sharepoint-设计师

http://sharepoint-mattharmon.blogspot.sg/2013/02/hiding-fields-in-infopath-2010_21.html

http://social.msdn.microsoft.com/Forums/sharepoint/en-US/4c366cd9-dd84-440c-bdbc-30ee2c81876e/conditionally-hide-a-field-in-a-custom-form-using-sharepoint-designer

您还可以尝试编写JavaScript并在SharePoint Designer中编辑列表编辑/新表单,然后插入JavaScript以隐藏/显示其他字段.

You can also try to write JavaScript and edit the list edit/new form in SharePoint designer and insert the JavaScript to hide/show other fields.


这篇关于表单根据下拉菜单中的选择进行更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆