开发者

How to Hide Fields in InfoPath 2010 for NewForm Items?

开发者 https://www.devze.com 2023-03-22 13:56 出处:网络
I have created a List in Sharepoint 2010 UI and customised the layout in InfoPath 2010. I now want to set some of t开发者_开发技巧he fields NOT to display in the NewForm List entry.How is this acheive

I have created a List in Sharepoint 2010 UI and customised the layout in InfoPath 2010. I now want to set some of t开发者_开发技巧he fields NOT to display in the NewForm List entry. How is this acheived?

I can see that you can set Rules on a Control but I don't see how you can effectively say...

"IF NewForm = TRUE THEN HideControl ELSE DisplayControl"...

Can someone help with this please?

Thanks.


This can be done without an additional field. For a new item, the ID field will not yet have a value. So you just need to create formatting rules for each control and set the control to hidden if the ID field is blank.


What you can do is add an extra field without a control on the form.

Now on the controls that have to be invisible put a formatting rule. Something like this (IF "Extra Field" is blank) --> Hide this control). In the formatting rule there is an option to make the control invisible.

The last thing you have to do is add an extra rule, so when you submit the form the field will get a default value.

Next time you open the form the field won't be empty and the hidden controls will be visible again.

0

精彩评论

暂无评论...
验证码 换一张
取 消