Wednesday, June 1, 2016

How to Hide a Field in InfoPath New Form of SharePoint List

Requirement:
We have a customized InfoPath form for a SharePoint List with "Request Number" field, which gets updated by an event receiver (or workflows sometimes) on Item created event. So, we wanted to hide the "Request Number" field from New Form.

Solution:
In high level, Insert a "section" control and move the field you want to hide inside to it. Add a formatting rule to hide that section with condition "ID is blank"! ID will be always blank on new forms!

infopath hide field in new form

Important: You need to have InfoPath Designer installed in your client machine!

Hide Fields in New Form of the InfoPath-SharePoint List form:
Here is how to hide a field in New Form, step by step:
  1. Navigate to your SharePoint list, Click on Customize Form from the List Tab. (Or you can open InfoPath Designer, New >> SharePoint List >> Design Form >> Provide the URL of SharePoint site , and run through the wizard)
  2. Insert a New row to the appropriate place in the form. In Home >> Click on Section control under Controls Group.
  3. Cut and paste the fields you want to hide in New Form to the "Section" control.
  4. Select the "Section" control >> Click on Manage Rules button from the ribbon >> Click on New, Provide a Name to it.
  5. In Condition, Set: ID is Blank
  6. Under Rule type, Select Formatting, and the tick the Hide this control check box.
  7. Save and publish your InfoPath form.

Alternate approach: You can also create a new "View" for "NewItem" in the InfoPath form with fields you want to show. and then Customize List >> Form Web Parts >>  Edit the form web part in NewForm page, and then select the default view in the properties.



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...