Poll Module

Posted by Community Admin on 03-Aug-2018 19:18

Poll Module

All Replies

Posted by Community Admin on 24-Jan-2011 00:00
Version 4.0 has no poll? Telerik in this module would not have to sell? I searched on the page "Purchase" and found nothing about ... can you help me?
Posted by Community Admin on 24-Jan-2011 00:00
Hey Renato,

There are a LOT of features and functionality that were in 3.7 that have not yet made it into 4.0 (even thought it's labeled officially released). See this post for just one of a number of posts that covers the subject of missing features: http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/what-else-is-missing-from-4-0.aspx

Here's a road map that was just released and it doesn't look like Polls will be coming anytime soon.
http://www.sitefinity.com/asp-net-cms-features/roadmap.aspx

Hope that helps.
Regards,
Phill
Posted by Community Admin on 24-Jan-2011 00:00
I do not believe ... is something so simple
Posted by Community Admin on 24-Nov-2011 00:00
Hi Everyone,

I have made a widget, which will allow you to select a form and get the count of the answers of multiple choice fields only Currently. I displayed everything in a literal. Please share any changes you make to improve this.

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FormResultControl.ascx.cs" Inherits="SitefinityWebApp.Widgets.FormResult.FormResultControl" %>
 
<div class="Partners">
    <h1 runat="server" id="h1MainTitle"></h1>
    <ul>
        <asp:Literal ID="ltlFormResultControl" runat="server"></asp:Literal>
    </ul>   
</div>

Template.ascx
<%@ Control Language="C#" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="Telerik.Sitefinity" TagPrefix="designers" Namespace="Telerik.Sitefinity.Web.UI.ControlDesign" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI"
    TagPrefix="sitefinity" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.Fields"
    TagPrefix="sitefinity" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Modules.Libraries.Web.UI.Designers"
    TagPrefix="sitefinity" %>
<div class="sfContentViews">
    <sitefinity:FlatSelector ID="itemSelector" runat="server" ItemType="Telerik.Sitefinity.Forms.Model.FormDescription"
        ItemsFilter="Visible == true AND Status == Live" DataKeyNames="Id" ShowSelectedFilter="true"
        AllowPaging="true" PageSize="10" AllowSearching="false" ShowProvidersList="false" ClientIDMode="Static"
        InclueAllProvidersOption="false" ServiceUrl="~/Sitefinity/Services/Forms/FormsService.svc" >
        <DataMembers>
            <sitefinity:DataMemberInfo ID="DataMemberInfo1" runat="server" Name="Title" IsExtendedSearchField="true"
                HeaderText="Title">
                            <strong>Title</strong>
            </sitefinity:DataMemberInfo>
        </DataMembers>
    </sitefinity:FlatSelector>
</div>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Runtime.Serialization;
using Telerik.Sitefinity.Web.UI.ControlDesign;
using System.Web.Script.Serialization;
using System.Text.RegularExpressions;
using Telerik.Sitefinity.Modules.Forms;
using Telerik.Sitefinity.Forms.Model;
using Telerik.Sitefinity.Libraries;
using Telerik.Sitefinity.Model;
using Telerik.Sitefinity.Modules.Forms.Web.UI.Fields;
using Telerik.Sitefinity;
 
namespace SitefinityWebApp.Widgets.FormResult
    [DataContract]
    [ControlDesigner(typeof(SitefinityWebApp.Widgets.FormResult.FormResultDesigner)), PropertyEditorTitle("FormResult")]
    public partial class FormResultControl : System.Web.UI.UserControl
    
        private string formId = string.Empty;
         
        public string FormId
        
            get
            
                return formId;
            
            set
            
                formId = value;
            
        
 
        private string MainTitle
        
            get;
            set;
        
 
        protected void Page_Load(object sender, EventArgs e)
        
            FormsManager formsManager = FormsManager.GetManager();
            if (formId != null)
            
                var form = formsManager.GetForm(new Guid(FormId));
 
                string strMarkup = string.Empty;
 
 
                foreach (var fieldControl in form.Controls.Cast<FormControl>().
                    Where(fc => fc.ObjectType == "Telerik.Sitefinity.Modules.Forms.Web.UI.Fields.FormMultipleChoice"))
                
                    var answerOptions = fieldControl.PropertiesLang
                        .Where(pl => pl.Name == "ChoiceItemsTitles").FirstOrDefault()
                        .Value.Split(new string[] ";" , StringSplitOptions.RemoveEmptyEntries);
 
                    var metaField = fieldControl.Properties
                    .FirstOrDefault(p => p.Name.Equals("MetaField"));
 
 
                    string metaFieldName = metaField.ChildProperties.FirstOrDefault(cp => cp.Name == "FieldName").Value;
 
                    foreach (string option in answerOptions)
                    
                        int count = formsManager.GetFormEntries(form).Where(frmEntries => frmEntries.GetValue<string>(metaFieldName).ToString() == option).Count();
                        strMarkup += option + " : " + count + Environment.NewLine;
                    
                    ltlFormResultControl.Text = strMarkup;
                
            
        
    

Designer.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Telerik.Sitefinity.Web.UI.ControlDesign;
using System.Web.UI;
using Telerik.Web.UI;
using Telerik.Sitefinity.Web.UI.Fields;
using Telerik.Sitefinity.Web.UI;
 
using Telerik.Sitefinity.Localization;
using Telerik.Sitefinity.Modules.Libraries.Web.UI.Designers;
 
namespace SitefinityWebApp.Widgets.FormResult
    public class FormResultDesigner : ControlDesignerBase
    
        protected override void InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container)
        
            base.DesignerMode = ControlDesignerModes.Simple;
        
 
        private string _layoutTemplatePath = "~/Common/Widgets/FormResult/FormResultTemplate.ascx";
        public override string LayoutTemplatePath
        
            get return _layoutTemplatePath;
            set _layoutTemplatePath = value;
        
 
        private string _scriptPath = "~/Common/Widgets/FormResult/FormResultDesigner.js";
        public string DesignerScriptPath
        
            get return _scriptPath;
            set _scriptPath = value;
        
 
        protected override string LayoutTemplateName
        
            get return "MideastTemplate";
        
        public override IEnumerable<ScriptReference> GetScriptReferences()
        
            var scripts = base.GetScriptReferences() as List<ScriptReference>;
            if (scripts == null) return base.GetScriptReferences();
 
            scripts.Add(new ScriptReference(DesignerScriptPath));
            return scripts.ToArray();
        
    

Designer.js
Type.registerNamespace("SitefinityWebApp.Widgets.FormResult");
 
SitefinityWebApp.Widgets.FormResult.FormResultDesigner = function (element)
    SitefinityWebApp.Widgets.FormResult.FormResultDesigner.initializeBase(this, [element]);
    this._container = null;
SitefinityWebApp.Widgets.FormResult.FormResultDesigner.prototype =
    initialize: function ()
        SitefinityWebApp.Widgets.FormResult.FormResultDesigner.callBaseMethod(this, 'initialize');
        _container = this;
    ,
    dispose: function ()
        SitefinityWebApp.Widgets.FormResult.FormResultDesigner.callBaseMethod(this, 'dispose');
    ,
 
    refreshUI: function ()
        var controlData = this._propertyEditor.get_control();
    ,
    applyChanges: function ()
        var controlData = this._propertyEditor.get_control();
        var formSelector = document.getElementById('itemSelector').control;
        if (formSelector._selectedItemsCount > 0)
            controlData.FormId = formSelector._selectedItems[0].Id
        
    
SitefinityWebApp.Widgets.FormResult.FormResultDesigner.registerClass('SitefinityWebApp.Widgets.FormResult.FormResultDesigner',
Telerik.Sitefinity.Web.UI.ControlDesign.ControlDesignerBase);
if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();


Regards.
Moiz Ahmed Sulaiman

Posted by Community Admin on 25-Nov-2011 00:00
Hello Moiz Ahmed,

Thank you for your contribution. I'm sure it will be very helpful for the entire Sitefinity community.

All the best,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
This thread is closed