George
George

Reputation: 2200

"there are no allowed placeholders" - why can't I add forms to my presentation?

I'm running Sitecore 7.2 with Web Forms For Marketers 2.4.

I have a placeholder settings main. That placeholder has the WFFM form control listed under "allowed controls". The "restricting placeholders" app also lists the main placeholder as the only selected placeholder.

I have a layout standard that points at a .cshtml file Standard.cshtml.

I have a template standard page. On the __Standard values of that template I've defined a presentation under the "default" device: layout is standard, and the main placeholder is listed under "placeholder settings".

My understanding is that I should be able to "insert form" onto either the __Standard values or on to content item instances of the standard page template. But every time I try either of those I get "there are no allowed placeholders in order to insert a new form". What do I need to do to get WFFM to let me add a form to my items?

Upvotes: 1

Views: 777

Answers (2)

Derek Hunziker
Derek Hunziker

Reputation: 13141

It sounds like you have everything setup correctly in order to insert a form into the main placeholder (possible security issues, notwithstanding). I believe the issue is the fact that the WFFM module is strictly Web Forms only at the moment and does not work with MVC layouts and renderings. Because your layout is a .cshtml file, Sitecore will trigger the MVC pipeline.

Apparently there is an update in the works that will support MVC and possibly support for a wizard / multi-stepped feature.

In the meantime, I have had to work around the issue by creating separate ASPX layouts / templates for form landing pages like the one below. The downside here is that you have to manage separate code paths for both MVC and Web Forms.

https://www.montereybayaquarium.org/support-us/membership/become-a-member-now

Upvotes: 1

George
George

Reputation: 2200

WFFM doesn't work with Sitecore MVC. Sad panda.

https://kb.sitecore.net/articles/522918

There are a couple of workarounds floating around (e.g. http://www.chrisvandesteeg.nl/2014/02/11/usercontrol-renderings-in-a-sitecore-mvc-website-wffm-for-mvc/), but I don't think they're supported.

Upvotes: 2

Related Questions