Customizing the Event Registration widget

Posted by Community Admin on 04-Aug-2018 14:18

Customizing the Event Registration widget

All Replies

Posted by Community Admin on 13-Jan-2014 00:00

I've downloaded and implemented the Event Registration widget from the Marketplace, and everything works well. However, I would like to modify the FormsControl.ascx file to add some CSS and include a title. Unfortunately, no changes I make in that file appear to be having any effect. I have rebuilt and ensured the updated EventRegistration.dll file is in my web project's bin folder, but the layout does not include my changes.

Am I missing a step to ensure that the .ascx file updates are properly embedded in the build?

Posted by Community Admin on 15-Jan-2014 00:00

Hello Josh,

Did you still experience the issue?

I have register and test this widget and the updates seems to works fine. What I have done is to:
- Make changes in the EventsRegistration\Resources > .ascx file
- Build the solution
- Copy and Replace the newly generated 'EventsRegistration.dll' file
  from: Events Registration project Bin folder
  to: SitefinityWebApp Bin folder.

Regards,
Svetoslav Manchev
Telerik

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

Posted by Community Admin on 22-Jan-2014 00:00

Yes, I'm still experiencing the issue. I am updating the dll properly, but for some reason the changes to the ascx file are not being utilized. Here's my ascx file (note the added title panel):

<%@ Control Language="C#" %>
<%@ Register TagPrefix="sfFields" Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.Fields" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<sfFields:FormManager id="formManager" runat="server" />
  
  
<asp:Panel ID="errorsPanel" runat="server" CssClass="sfErrorSummary alert alert-danger" />
<sf:SitefinityLabel id="successMessage" runat="server" WrapperTagName="div" HideIfNoText="true" CssClass="sfSuccess" />
<asp:Panel runat="server" ID="formTitle"><h2>Register for this Event</h2></asp:Panel>
<asp:Panel ID="formControls" runat="server">
      
</asp:Panel>

That <h2> tag does not show up in the rendered control. However, I can manipulate the other components via the codebehind. So it seems that recompiling the project does incorporate code changes, but the underlying ascx resource isn't being updated.

Posted by Community Admin on 23-Jan-2014 00:00

Hi Josh,

The amendments could be done in the .ascx file of the designer. The widget will show on the frontend the selected Form only. The page style and design could be done by adding this widget on a predefined Page Template or by adding widgets you need directly on that page (for example Content Block, Image, etc.). This will allows you to manage the Page content more flexible.

In addition, in the 'How to Install' video of the Events Registration Widget is shown how the widget could be set-up and used.

Regards,
Svetoslav Manchev
Telerik

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

Posted by Community Admin on 23-Jan-2014 00:00

I would encourage you to try it. Create a new solution, add and reference the Events Registration project, then make a cosmetic change to the ascx file in question -- add a title or something. Build and test. If you don't get the same results then there must be something in my environment.

Incidentally, I added the widget then modified the code because the scenario you describe -- using content blocks -- isn't optimal. Not all events require registration, so I have added a boolean custom field indicating whether the Event Registration widget should be displayed. As a result, I need to be able to hide the entire thing, title and all. That's what prompted the modification.

In any case, I have worked around it in another way. Rather than modify the ascx, I have to manipulate the controls collection in the codebehind in order to add my headline and manipulate the CSS classes assigned to the components. I wouldn't say this "solves" the problem, it just gets at it via another route.

Posted by Community Admin on 27-Jan-2014 00:00

Hello Josh,

In order to use the FormsControl.ascx file please do the following:
- set the file as embedded resource under FormsControl.ascx properties.
- In FormsControlCustom.cs update:
  > Correct the path to the file (if needed) under:

private const string layoutTemplateName = "FormsNotification.Resources.FormsControl.ascx";
  > Override the LayoutTemplatePath by adding this property:
public override string LayoutTemplatePath
        
            get
            
                string str;
                str = (!string.IsNullOrEmpty(base.LayoutTemplatePath) ? base.LayoutTemplatePath : FormsControl.layoutTemplatePath);
                return str;
            
            set
            
                base.LayoutTemplatePath = value;
            
        

- Update FormsControl.ascx as per your needs.
- Build the solution

Regards,
Svetoslav Manchev
Telerik
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