0

I am working on a project where I have to create a form for users to register. I created a list, created the columns and I use newform.aspx as the new registration page and I followed some online articles to set up my form correctly together with the "Save" and "Cancel" buttons. Using Share point designer, I deleted the list form on the newform.aspx page and added a custom form (the list) to the page.

The main issue I am having is that when users register on the form and click the submit or the cancel button, the page redirects to the list itself, where users can see all previous registrations done, which should not be the case.

So i decided to redirect the "Save" and "Cancel" buttons so that after submit or cancel, it goes to the main page.

Please see the codes for the "Save" and "Cancel" buttons below:

<SharePoint:SaveButton runat="server" ControlMode="New" id="savebutton2" RedirectUrl="https://aaa.com/bb/cc/dd/Pages/default.aspx" InDesign="True"/>

<SharePoint:GoBackButton runat="server" ControlMode="New" id="gobackbutton2" RedirectUrl="https://aaa/bbb/ccc/ddd/eee/Thank-you-for-registering.aspx" InDesign="True"/>

As you can see, the redirection URL for the save and cancel button is different, but when I click on the submit button, it redirects the page to the URL specified in the cancel button, instead of the URL specified in the save button itself.

It seems that the "save" button is linked to the "cancel" button in some way as it takes the parameters specified in the cancel button.

Am I doing something wrong in this?

Is this a bug?

Should I delete and re insert the form?

I am very confused and frustrated about this.

Could you please lend me some help and advise on how to go about resolving this issue?

0

Just add the source parameter in the URL : Some thing like

Lists/ListName/NewForm.aspx?Source="www.domainname.sharepoint.com/homepage"

Whatever the URL we have mentioned in the Source Param , it will redirect there after submit or cancel.

Source Param is generally the url of the page from where the request is generated

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.