Hidding master page for forms

I have a very strange request I am getting from a contract job.  They want their users to be notified via email to approve an item on a form but they don't want the user to go on sharepoint and instead want the form embedded in the email itself. Strange.

It looks like I can actually send an edit form via email if I stick it inside an Iframe in the html of the email, and it first asks for authentication, and then will let them view the form as long as they are on the network when viewing. I was surprised it worked.

I also need to get rid of the master page. The problem is that when viewing it in SharePoint or even an email, when I use editform.aspx?dlg=0&id=1 (or whatever the id number is), it works great and gets rid of the master and submits it, but it shows a blank page rather than redirecting back to the allitems page.

So how do i get it to redirect to all items?
LVL 9
BobHavertyComhAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rainer JeschorCommented:
Hi,
just a guess (as simulating the above works on my dev environment) but can you try to add an additional parameter to the iframe src url:
&source=urlencoded url of your view
like
&source=http%3A%2F%2Frainerj%2Emysharepoint%2Ede%2Ftest%2FLists%2FEEBooks%2FAllItems%2Easpx
where
%2F == /
%3A == :
%2E == .

HTH
Rainer
0
BobHavertyComhAuthor Commented:
Yes, I have found that and it's a good answer as usual. It works if you do not invoke dlg=0 in the query string which is what I wanted to use to show the form without the master page. If I use dlg=1, there are no scroll bars for the form. dlg=0 gives scroll bars. Strange but true. But if I use dlg at all, it doesn't seem to understand the redirect, and I can only guess that this is because it thinks it's a dialog box. It works when I don't use dlg. I might even use the negative margin clipping capabilities of the Irame to hide the master page if necessary, but it looks a little bit strange because it clips off the button part of the scroll bars on the left and top. I could live with that I suppose.
0
Rainer JeschorCommented:
Hi,
how do you send/create the email?
I used a local HTML file with an iframe element and it worked as expected.

Alternative solution(s):
Either
- create a second edit form and add add styling information to hide the unnecessary elements
- adjust the existing edit form to apply additional styling for the elements (display: none) if a custom url parameter like "frommail=" equals 1

HTH
Rainer
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

BobHavertyComhAuthor Commented:
I only have gmail, so i can't test it because it doesn't translate html emails, but this will be used in outlook by the client, so i assume that it will work. I have been testing this strictly in the browser to get it to work there first. I am creating non default edit forms and their url will be used in the email or browser. I can do just about anything I want with the form fields, but if I lose the master, all styling for the form falls apart, and I don't feel like creating these forms and styling them from scratch.

If the source parameter worked in conjunction with the dlg parameter, I would be all set because dlg hides the master and works as a dialog, but that is probably what prevents the source redirection from working. I'm not sure. Can you get it to work with a dlg=0 or 1 parameter? Maybe I did something wrong, but after form submittal I just get a blank page. Without the dlg, it redirects back to allitems.aspx or whatever other address I want as expected.

I didn't understand what you meant about frommail, but I can merely create many custom edit forms and adjust the url in the iframe of the email based on who the workflow sends it to. This way, more and more fields will appear as the approval process moves along because a different form will be sent with more fields each time as additional approval is needed. So that part I'm fine with, and I usually don't like messing with the actual styles
0
Rainer JeschorCommented:
Hi,
I am using this HTML source:
<iframe src="http://rainerj.lovessharepoint.de/test/Lists/EEBooks/EditForm.aspx?ID=2&Dlg=0&source=http%3A%2F%2Frainerj%2Elovessharepoint%2Ede%2Ftest%2FLists%2FEEBooks%2FTest%2Easpx" style="width:600px;height:500px;"></iframe>

Open in new window


This opens the edit form of a custom list and after click on OK it redirects to the custom view "Test.aspx".

When you use the url parameter "IsDlg=1" then you will get an error as closing the "popup" window tries to call a Javascript callback from the parent page (which does not exitst) and therefore just getting a Javascript error and a blank page.

Can you use Fiddler to track the HTTP requests and responses?
Which browser do you use for testing?

HTH
Rainer
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BobHavertyComhAuthor Commented:
I am using Firefox. I thought I tried dlg=0 and I did not get an error, just a blank page. If it works for you in firefox, then it must have been my error somewhere and I'll mark the question answered. Thanks.
0
Rainer JeschorCommented:
Hi,
works on IE8 and FF23.
HTH
Rainer
0
BobHavertyComhAuthor Commented:
OK. must have done something wrong. Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.