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

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.

Related

Kentico - Editable WebPartZones on children pages?

I added a WebPartZone in the master page at the top pf the master page, this web part zone is a message bar that will display on all the pages but could be different on each page. Is it possible to have a web part zone in the template that is editable on each page? Or is a different way to do it?
Thanks
The short answer no. From the template engine prospective whatever editable in the master - is not editable in its children. All editable web parts/widgets editable on the master, are not editable in its children.
If you really want to have an editable text in the master and all its children, you probably need to clone and customize web part and form control it is based on. Or create you own web part.
P.S. You can have editable text in your page template so all page that use this template will have this editable text working.
If you can give more details on what kind thing you want to edit would be easier to provide an answer
P.P.S. You can have a work around but it will not be with editable text. You will have to edit message text at the form tab. Would that suits you?
You can add the webpart on your master, and use a macro to get the content, like {%CurrentDocument.GetValue("Message")%}, but you have to add a field to each page to store the message in.
Just throwing out one more option, if what you want to display changes from page type to page type, you can put a repeater on the master page, put a path of a period (current document), then use macros to set the page type to the current document class name and the transformation to currentdocument.classname+".mastermessage"
Using a macro, then add a transformation "mastermessage" to each page type it will encounter, then you can change the fields and format for each page type.

Sitecore Placeholder Setting

Do I really have to set Placeholder Settings for rendering items in Presentation Detail??
I have many placeholder settings (without adding into Presentation Detail) and I can see empty placeholders areas (gray-box) without any problem. Then, I can choose assigned rendering items from the selected empty placeholder.
However, whenever I update files in "/App_Config" or "/bin" folder, all empty placeholder areas are disappeared (No gray-box) if the placeholder setting was not added into Presentation Detail. So, in Content Editor, I go to placeholder setting items which have the issue, then edit and save again and refresh the xEditor page. Now, the saved Placeholder Setting item appears.
What is the problem??? When App Pool recycles, is there something removing placeholder thing?? I have no idea...
I'm using Sitecore 8.0 and dynamic binding like #Html.Sitecore().Placeholder("Placeholder Key Name")

Sitecore Web Forms for Marketers - Complex custom field

The client wants to be able to display, within a WFFM form, a list of Sitecore items (each item containing an image & some HTML text), each item next to a checkbox to allow the end user to pick one or more of these items.
Within the form designer, for this particular field, we would like to have an item selector which can be used by the content editor to pick and choose which items to display in the list.
Is this something feasible in WFFM? Are there examples of complex custom form fields that I could take a look at? Thanks!
I just found out that what I asked can be easily accomplished with the ChechboxList field type already provided by WFFM and some CSS styling to handle the content of each item.
Thanks and sorry for the post.

Sitecore WebFoms for Marketers module

I want to ask you how it will be better to implement: using Sitecore WebForms for Marketers module or in standard .ascx sublayout.
So I need to implement huge form with dynamic dropdowns, date pickers, checkboxes, radiobuttons, etc. This form contains also dynamic adding new controls (see description in attachment above). So is it possible to create this form in Sitecore WebForms for Marketers module or it will be easier to write it as standard form in ascx.
This form will be saved to sitecore database.
Please answer if somebody have already done smth like this.
Thanks.
To my kowledge it isn't possible to do this out of the box with WFFM in Sitecore.
I guess the first question to ask is: do you or your customer want/need to be able to manage forms themselves without developer interaction?
If the answer to this question is yes, then you could try to implement this with WFFM, otherwise it may be easier to just implement as a normal sublayout.
EDIT
One other thing you could also do is to create a form, then use the 'export to ascx' function. You can look at the generated code to see how the data is written to the WFFM database - this way you can have your custom form functionality but still leverage the reporting functionality in the Sitecore client. If you have some decision tree-like logic for displaying the different fields you could probably drive this from Sitecore content items as well.
As per my knowledge you can create this form with the help of Web form for marketer but in this case you need to create some custom fields and update these fields as per your requirement.
To Create custom field create field under /sitecore/system/Modules/Web Forms for Marketers/Settings/Field Types/Custom location and in custom field define your created custom class and assembly.
You can update design by applying your custom css classes.
Class you can create under /sitecore/system/Modules/Web Forms for Marketers/Settings/Meta data/Css Classes location and apply class on specific control.

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