1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / modifying SubscriptionFormTemplate.ascx

modifying SubscriptionFormTemplate.ascx

3 posts, 0 answered
  1. Roberto
    Roberto avatar
    146 posts
    Registered:
    08 Feb 2008
    15 Feb 2010
    Link to this post
    Hi All,

    I am trying to edit SubscriptionFormTemplate.ascx to include a title and some additional text which is part of the design i am implementing.  I have editted the control but the content outside the fieldset is ignored.  Is there a way i can include my extra markup that i need to wrap around the subscription form template?

    Thanks,

    Rob
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    15 Feb 2010
    Link to this post
    Hello Roberto Modica,

    I added a simple Label control with a text to the template and everything works fine. As you can see the control uses ASP.NET Placeholder control which does not produce any visible output and is only used as a container for other controls on the Web page.

    <asp:Label runat="server" Text="This is just a test" ID="lable1" />
     
    <asp:PlaceHolder runat="server" ID="emptyForm" Visible="false">
        <asp:Literal runat="server" Text="<p class='sf_emptyForm'>The Subscription Form has not been set yet!</p>"></asp:Literal>
    </asp:PlaceHolder>
    <asp:PlaceHolder ID="emailhldr" runat="server">
        <fieldset class="sf_newsletterSubscriptionForm">
            <asp:Label runat="server" Text="Email:" AssociatedControlID="sf1_email"></asp:Label>
            <asp:TextBox runat="server" ID="sf1_email" CssClass="sf_subscribeTxt" ValidationGroup="subscription"></asp:TextBox>
            <asp:RequiredFieldValidator ID="emailEmptyValidator1" runat="server"
                ValidationGroup="subscription" ControlToValidate="sf1_email" Display="Dynamic"
                EnableViewState="False" SetFocusOnError="True" CssClass="sf_emailValidation">
                <strong><asp:Literal ID="Literal1" runat="server" Text="Email cannot be empty!"></asp:Literal></strong>
            </asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="emailREValidator1" runat="server"
                ControlToValidate="sf1_email" Display="Dynamic" EnableViewState="false" SetFocusOnError="true"
                ValidationExpression="\s*\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*\s*" ValidationGroup="subscription" CssClass="sf_emailValidation">
                <strong><asp:Literal ID="literal2" runat="server" Text="Wrong email!"></asp:Literal></strong>
            </asp:RegularExpressionValidator>
     
            <asp:Button Visible="false"  ID="subscribeEMbtn" runat="server" Text="Subscribe" CssClass="sf_subscribeBtn" ValidationGroup="subscription" CausesValidation="true" />
             <asp:Button  ID="CustomSBSCR" runat="server" Text="CustomSBSCR" CssClass="sf_subscribeBtn" ValidationGroup="subscription" CausesValidation="true" />
              
        </fieldset>
    </asp:PlaceHolder>


    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Roberto
    Roberto avatar
    146 posts
    Registered:
    08 Feb 2008
    15 Feb 2010
    Link to this post
    Thanks Ivan,

    for some reason i looked at it as a panel instead of a placeholder Doh!

    Thanks again.

    Rob
Register for webinar
3 posts, 0 answered