SharePoint Events

  5/13/2013 - Conference: SharePoint Summit 2013
  5/21/2013 - Webcast: SharePoint 2013 and ECM: Content Migration and Storage
  5/22/2013 - Webcast: Managing CAD in SharePoint
  5/23/2013 - Webcast: SharePoint Document Automation and E-Forms for Financial Services
  5/24/2013 - Webcast: What's New in Search for SharePoint 2013

 SharePoint Videos

  Why SharePoint 2013
  SharePoint 2013 Launch
  SharePoint 2013 Migration and Governance
  SharePoint 2013 and Enterprise Content Management
  Top Benefits of SharePoint 2013
  What's New in Business Intelligence in Office and SharePoint 2013
  SharePoint and Office 2013 Integration
  SharePoint 2013 Infrastructure Preview
  SharePoint, Lync, and, Exchange in the Cloud with Office 365
  Advanced Reporting in SharePoint with Microsoft Power View

 Archives

Opening SharePoint Links in a new windowUse SHIFT+ENTER to open the menu (new window).
Mail Enabled Lists vs. The Missing Windows 2008 POP3/IMAP Server Use SHIFT+ENTER to open the menu (new window).
7 Tools for SharePoint DevelopersUse SHIFT+ENTER to open the menu (new window).
Public Facing Masterpage TechniquesUse SHIFT+ENTER to open the menu (new window).
How to Quickly Deploy and Activate a Timer Service to Your Site CollectionUse SHIFT+ENTER to open the menu (new window).
Custom SharePoint Master Page Feature with WSP BuilderUse SHIFT+ENTER to open the menu (new window).
Date Math with InfoPathUse SHIFT+ENTER to open the menu (new window).
Enterprise Search Tricks and Tips Part 1Use SHIFT+ENTER to open the menu (new window).
Populating Word Documents With SharePoint Data. Try The DIP!Use SHIFT+ENTER to open the menu (new window).
Programmatic Deep Dive into Blank SharePoint Lookup ColumnsUse SHIFT+ENTER to open the menu (new window).
1 - 10 Next
Redirecting Your Data View Forms On Submit

By: Omar Stewart

 

This is a quick tip that will help you when creating data view forms. Data View Forms are a great way to quickly provide an a way for users to add data to a sharepoint list. One of the issues that may arise is that when a user clicks submit, The form has a default location where it will direct the user to. There are times when this can be a problem. Sometimes you want a user to fill out a form, click submit, then be taken back to the homepage. This is easy to achieve using form actions.

 

Let's take a look at an example.

 

First we'll create our basic list.

 

Redirecting_Your_Data_View_Forms_On_Submit 

 

Now that we have a list, lets head to SharePoint Designer and give users a form to input entries into the list.

 

Once you have SharePoint Designer open, go ahead and open up your site, then  click File >> More Pages>> ASPX Page.

 

 

 

Redirecting_Your_Data_View_Forms_On_Submit

 

(Edit in advanced mode)

 

On the newly created page, click INSERT >>  Select the Data View DROPDOWN >> Then click Click Empty Data View.

 

Once the empty dataview is in place, click on it to select a source.
 

Redirecting_Your_Data_View_Forms_On_Submit

 

Once you select a source, you should see your fields appear on the right side panelof the window. Control Click the fields you would like in your form, then click Insert Selected Fields as >> New Item Form.

 

Redirecting_Your_Data_View_Forms_On_Submit

 

You now have a form ready to be published. This form will automatically populate the SharePoint list. Feel free to design the form as you please.

 

Users can now access this form and submit data to that list.   Now lets say you would like your users  to go back to your site landing page after submitting an item.

 

Open up the Source View in Designer, look for the <Input> button with a value of "Save".  If we look at the OnClick event , you'll see the JavaSCipt call that the form uses to submit to the list.

 

Redirecting_Your_Data_View_Forms_On_Submit

 

This is where we can modify the action of the submit action.

 

Lets invoke a redirect after the commit action.

 

Redirecting_Your_Data_View_Forms_On_Submit

 

Now when a user submits the form, the data will be submitted to the list, then they will be taken to the specified URL !

 

Note: this could also be done by using the form actions menu.

 

By: Omar Stewart

        

Comments

Matt B.

You used to be able to choose Form Actions by right clicking on the button and selecting Redirect.  Has that changed?
at 11/2/2010 5:36 PM

N03L

Is there a way to do this kind of redirection based on a condition?
I’m trying to build a solution using SharePoint Designer 2010 and a custom list to enable staff to enter some basic details about their movements during the coming week.
I’d like to provide the ability for them to check a box if they need a hotel booking and if that box is checked, once the custom lists newform.aspx is submitted the newform.aspx that’s associated with the hotel booking list is opened rather than the user being sent back to the first custom lists default view.
Ideally once the second, hotel booking form is submitted I’d like them to then be directed back to the first lists default view.
I’m not a developer so please be gentle.
at 9/1/2011 4:16 AM

Omar

N03L, The easiest way to do this would probably be to pass around some query strings with each submission. The first click could pass a value so the url would be "http://site.com/lists/booking/newform.aspx?BookHotel=True&AssociatedHotel=Marriott&SourcePage=whatever"

When the newform.aspx processes, if BookHotel=True, it would navigate to the BookHotel Form, when that submits, it would return them to the SourcePage..

at 9/6/2011 3:17 PM

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Your Name *


e-mail address *


Website (optional)


Comment *


Attachments

 Subscribe

  GigWerks RSS  Gig Werks Mailing List 

 Contact Us

 Connect

 Resources

  On Demand SharePoint Webcast Recordings
  Upcoming Webinars
  SharePoint Resources
  Business Intelligence Resources
  Gig Werks Website



©2009 Gig Werks. All rights reserved. Privacy Policy