Different views for display, edit and new item in InfoPath list forms

Custom lists and InfoPath forms make a good combination, although InfoPath in this scenario lacks some functionality but still this combination is hard to avoid in many situations. You can check out my previous post about the differences between InfoPath in form library, InfoPath with custom lists and aspx forms for custom lists.

When working with InfoPath custom list forms it’s sometimes required to have different views for new, edit and display item modes of the form.

Display View

There are two ways you can choose display view otehr than the default view.

First is in “advanced form options” in InfoPath file menu, here you can choose your display view.

 

Advanced form options

Advanced form options

 

 

Second options is outside InfoPath and it applies not only to display mode but also to edit and new modes.

Suppose you want a different view for display item mode.

1. Open the site in SP Designer

2. Open list detail page and open displayifs.aspx in ‘Forms’ list

3. Select the Infopath viewer webpart and look in the properties window, you will find the “DefaultView” property inside “Misc” section

Same can be done in newifs.aspx and editifs.aspx for new and edit item modes

 

New Item View

It’s easy just check empty ID field in InfoPath rule on form load and change view. Or use the above mentioned designer option.

 

Edit Item View

If you have set different display view and switching view for new item on form load based on empty ID field, then for edit item mode just leave it to the default view. And of course you can change in SP designer as mentioned above.

 

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: