SharePoint 2013: Using StratusForms I deleted "NewForm.aspx", now only the new "NewForm" will not work - sharepoint-2013

Tools: SharePoint 2013, SharePoint 2013 Designer, StratusForms
What I was doing: StratusForms - Modify SharePoint's Default Forms with HTML Templates (https://www.youtube.com/watch?v=oai-m_KyzMc)
Status: DispForm and EditForm currently work, NewForm did work until the incident.
Incident: I deleted the main webpart on NewForm and the form was hosed, so I deleted NewForm.aspx. I recreated the NewForm.aspx and also added it to forms library (https://sharepoint.stackexchange.com/questions/108467/accidentally-deleted-default-editform-aspx). Like before when it worked, I added a Content Editor webpart and pointed it to my StratusForms template, but it did not work . The controls/boxes did not show up. It worked before on the old NewForm, and it currently works on DispForm & EditForm.
Question: Given the above information does anyone know why, or better yet have a solution, to get NewForm.aspx working with StratusForms again?
Thank You!

So the underlying issue was SharePoints internal linkage of it's 3 forms (DispForm, EditForm, NewForm) to the data sources.
So those out-of-the-box forms are not like the ones we create. Even though you create a new "NewForm" and it may look like the old default NewForm, but it is not. There is metadata like Microsoft.SharePoint.PAGETYPE, which tells if it is a custom form or new, display, or edit form.
The resolution was found in this article (http://www.sharepointblogs.be/blogs/vandest/archive/2011/03/11/troubleshooting-issues-with-dispform-editform-and-newform.aspx).
In case the link breaks I have also included the manual method here:
Manually
It's easiest if you take a corresponding form from another SharePoint List in the site and export it (SharePoint Designer) or just copy it to a text editor. This way, most of the settings of the List Form Web Part are already correct
Generate a new GUID and fill that in for the __WebPartId [uppercase & just change a few chars/numbers] and properties [lowercase, same as WebPartID & has a g_ prefix] of the List Form Web Part markup. It has to be the same GUID but the formatting is different. See the above screens for samples
Update the property with the List ID you're targeting
Verify all other properties of the List Form Web Part and save the file as either DispForm.aspx, EditForm.aspx or NewForm.aspx
Import (SharePoint Designer) the page (or paste contents from the text editor)

Related

How to make a statically binded rendering editable via Experience Editor (Sitecore MVC)

So I have a layout view within Sitecore Mvc, this view contained a Controller Rendering that pulls in a header and footer navigation. Example:
#Html.Sitecore().Rendering("/sitecore/layout/renderings/some_rendering")
This specifies a Controller Rendering I've defined in Sitecore. This works great, except when I'm in the experience editor. It doesn't give me the ability to select this rendering. If I create a Placeholder and then define these navigation elements to this placeholder dynamically via Sitecore, then I can, but these navigational elements exist on every page of this layout, so I would like them statically placed instead of using a Placeholder, but I would still like the user to be able to select the navigation element in the experience editor (so I can create custom command to interact with this navigation, such as creating new links, etc).
Does anyone have an idea that will help me achieve this?
Use Edit Frame for that and create Custom Edit Frame Button for operations like adding new element to the navigation.
And remember to pass Datarsource ID or Path as a second parameter to the Html.Sitecore().Rendering() method:
#Html.Sitecore().Rendering("/sitecore/layout/renderings/some_rendering", new { DataSource = "{some-id-or-path}" })
Here is set of blog posts which can help you to understand how Edit Frames work and how to add them in Sitecore MVC solution:
https://visionsincode.wordpress.com/2015/01/08/how-to-use-editframe-in-sitecore-mvc/
https://www.cmsbestpractices.com/how-to-properly-use-sitecore-edit-frames/
https://briancaos.wordpress.com/2011/11/28/using-sitecore-editframe-in-pageedit/
You won't be able to remove the component or move it around the page (yeah, it's statically bound to one place on your layout), but you will be able to edit it's properties and datasource.
You can try to use GlassMapper views and statically inherit the view from the GlassView.
Then you'll be able to use Editable method to render the field.
But the consideration you need to take is that you'll not be able to set a datasource to the component from the page editor or content editor.
Instead of injecting the rendering through the Rendering method you should be able to use standart MVC RenderPartial.
I've used this approach on one of the projects I've been on and it worked.

How to add custom menu in Sitecore menu list

i want to add my custom application name in Sitecore Start Menu List, i'm following this article :
Adding Application Shortcut
it saying use Core database i'm using this, i couldn't find Layout studio, can any sitecore developer suggest me how to find this and finish my job. Thanks in advance.
I think the instructions you've linked to there are out of date. I've not seen that bit of UI in recent releases of Sitecore.
Working in Sitecore 6.6 I've successfully made custom applications using these instructions:
http://sdn.sitecore.net/Articles/Customizing%20Sitecore%20Client/Adding%20an%20Application%20Shortcut/Creating%20an%20Application.aspx
But beware the issue that I've blogged about here. The recent revisions of Sitecore subtly break the configuration defined above, and you have to manually edit out a file extension to make everything work:
https://jermdavis.wordpress.com/2014/10/20/a-gotcha-with-custom-applications/
-- Edited to add --
Based on the "it doesn't work in 7.5" comment below, I've tried these instructions on a test instance of Sitecore 7.5 rev 141003. It seems 7.5 behaves slightly differently - but I can still make it work.
Create the item under /sitecore/content/Applications using the external link button for the "Application" field. With raw values displayed, it should look something like:
And then create your application shortcut under /sitecore/content/Documents and settings/All users/Start menu using an internal link for the Application field. I found this still added the '.aspx' extension mentioned in my blog post, but I also found that editing it out again didn't work - it reappeared as soon as I hit save. I needed to edit out the extension from the link data using the Raw Values view in order to get the data shown below:
With those things set up, refreshing the page caused the test item to appear on my start menu:
Hopefully that works for you too?
-- Further edited to add --
New blog post covering this problem in Sitecore 7.5:
https://jermdavis.wordpress.com/2015/01/19/gotchas-with-custom-apps-v2/
Which version of Sitecore are you using? The Layout Studio is probably one of the least features in Sitecore, and personally not something I have ever used.
Instead you should create the the layout in Visual Studio - which then means your layout can be added to your Source Control System. Then follow the instructions in the link in Jeremy's answer.
If you do need to access the Layout Studio for some reason you can find it under: Sitecore menu > Development Tools > Developer Center. From there you can create new files/open existing files.

Which .XML file are using for Insert Link button of General Link field in Sitecore 7.2

Can anybody tell me which .xml file are using for Insert Link button of General Link field in Sitecore 7.2.
I have tried to update below files but all are not affecting -
Sitecore.Shell.Application.Dialogs.InternalLink-InternalLink.xml
Sitecore.Shell.Application.Dialogs.InsertLink-InsertLink.xml
Sitecore.Shell.Application.Buckets - BucketInternalLink.xml
Sitecore.Shell.Application.Buckets - InsertLink.xml
I think under Buckets folder files are using in case of General Link field with Search
I have tried for all
If I am updating other files like
Sitecore.Shell.Application.Dialogs.ExternalLink - ExternalLink.xml
then it's showing updates in Sitecore but in case of insert link no one files are working.
Thanks in advance
check out my blogpost about fixing the internal link. It might prove difficult to extend but it is possible. At least I have been able to override the class and pass the preLoadPath.
http://reinoudvandalen.nl/blog/fixing-sitecore-7-internal-link-with-speak/
In Sitecore 7.2 the XML Insert Link Dialog is replaced by the new SPEAK UI Dialog. The actual url of the insert link dialog is located on
http://[yourdomain]/sitecore/client/applications/dialogs/InsertLinkViaTreeDialog
The actual file is located in the core database under: /sitecore/client/Applications/Dialogs/InsertLinkViaTreeDialog.
From there you can navigate to the appropriate renderings and modify them (which might affect other windows.
If you want to enable the old style InsertLink that uses the InsertLink.xml you can disable it from /App_Config/Include/Sitecore.Speak.config and remove the following line:
<override dialogUrl="/sitecore/shell/Applications/Dialogs/Internal%20link.aspx" with="/sitecore/client/applications/dialogs/InsertLinkViaTreeDialog" />

Cannot get a Sitecore form to display in a placeholder (Web Forms for Marketers module)

I'm busy writing a sitecore solution to manage a news site. I have a NewsArticleLayout (used to display a NewsArticle item), with a NewsArticleMailPlaceholder which I want to use to display a form where a user can enter a name and email address where a news article link must be mailed to.
On the NewsArticleLayout page is already a NewsArticleSublayout with a phNewsArticle placeholder, which is currently correctly displaying data related to a news article.
When I try to link the form to this placeholder, I only seem to be able to link to placeholders in sublayouts, not in layouts, so I created a MailNewsArticleSublayout, and placed a phMailNewsArticle placeholder on it. Then I told the form to display on the NewsArticleLayout, using the MailNewsArticleSublayout, and the phMailNewsArticle placeholder.
However, when I view the page, my form doesn't display. I've done a full publish of my entire Sitecore content tree, nothing seems to fix it.
I've even added a phEmail placeholder to the NewsArticleSublayout, and linked this to the form layout details, but this also doesn't display anything.
Have I correctly setup my form's layout? Is there something I'm missing here?
After speaking to sitecore support, I was able to resolve the issue. What I was missing was adding "Form" to the layout details on the standard values for my template. Then in this Form element, fill in the actual Form's location in the "FormID" field. After adding this, it worked perfectly.

sitecore: webforms for marketers, one form, two pages

I want to use single form for several pages like a block. Sitecore always creates a new form for a page.
How to share/reuse a form?
Depends on weather you are using WFFM 1 or 2 but it is quite similar.
Go to "Presentation/Layout details" for the item (page) that holds the form. You will find a rendering called "Form Interpreter" click this.
If you are using WFFM2 there is a "FormID" field that has your form selected. Just add a similar rendering to every page that you want the form to appear in and select the same form.
For WFFM1 there would be a parameter called "FormID" and a sitecore ID, copy this ID and the same renderings to the other pages including the parameters.
Good luck, Larre
There's an option to select a form to copy from. See paragraph 2.3.1 "Copying an Existing Form in the Page Editor" of this guide.
I had same issue with WFFM MVC version 8.1 (initial release)
our content editors wanted to use experience editor(page editor) and didn't want to change the datasource by going to presentation details and updating the datasource.
It doesn't need any coding
1- Copy /sitecore/layout/Renderings/Modules/Web Forms for Marketers/Mvc Form and give it a name "Custom Form"
2- Set the Data source location
3- Add the new rendering to place holder settings
/sitecore/layout/Placeholder Settings/content
my blog post
http://azadehkhojandi.blogspot.com.au/2016/01/how-to-reuse-web-forms-for-marketers.html