Translation of Warren B's email form..and contactform Options
claus_n
Posted: Friday, November 23, 2007 5:29:45 PM
Rank: Newbie

Joined: 8/22/2006
Posts: 9
I'm using the webpackage Warren so nicely made for all us numbskulls:tease:

The contactform labels is of course in English and likewise in the the email a friend form. I changed the labels in the acsx files. But now I get errors after having changed the labels in the ContactForm.acsx and the EmailAFriend.acsx files.

The contactform still sends the form data correctly to me(my mailbox), but doesn't send me to the thank you page. However if I submit my very own email adress in the form I'm sent to the thank you page...why? Using all other emaliadresses I get the error...how odd is that?

In the email a friend form I get this error after the labels have been translated:

"Error creating control (/usercontrols/EmailAFriend.ascx).
Maybe file doesn't exists or the usercontrol has a cache directive, which is not allowed! See the tracestack for more information!"

Any bright heads out there with the urge to pour out some wisdom :-)


Sincerely,
Claus
claus_n
Posted: Sunday, November 25, 2007 1:07:58 PM
Rank: Newbie

Joined: 8/22/2006
Posts: 9
Ok then, I guess I'll answer myself!

It's a relay denied issue. So I suppoese I'll have to contact my ISP.


For the emailform it was a weird issue of file format. Weird because I had no problems editing the contactform in wordpad. But the emailform became a mess in wordpad. Ayway using a javascript editor instead did the trick for me!
warren
Posted: Sunday, November 25, 2007 3:12:14 PM

Rank: Addict

Joined: 7/19/2006
Posts: 820
Location: Benfleet, Essex, UK
Hiya,
I'm glad you found it easy to edit and customise, this is what it was intended to do, to help people in .NET and Umbrco.

Welcome aboard the great CMS that is Umbraco :)

Warren Buckley an Umbraco MVP 08-09 & level 1 certified developer
chrism
Posted: Sunday, November 25, 2007 4:51:32 PM
Rank: Devotee

Joined: 1/11/2007
Posts: 57
hi warren...
second the thanks...
i made a little change or two to your email control as well as I was using it with blueprint css framework, as i'm very lazy. i noticed that your label tags are hardcoded. asp.net actually has a kryptic way of generating these for you (so you don't have to hardcode the full name of the control into the <label for... >) basically, you do a standard asp.net label, and add the AssociatedControlID to it.

hope thats ok use or interest to you or someone.
cheers,
chris

Code:

    <fieldset>
        <legend>Friends Details</legend>
        <asp:Label runat="server" ID="lblFriendsName" AssociatedControlID="FriendsName">Friends Name: <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="FriendsName" ErrorMessage="Please enter your friends name.">*</asp:RequiredFieldValidator></asp:Label><br />
        <asp:TextBox ID="FriendsName" runat="server" CssClass="TextBox"></asp:TextBox></label><br />
       
        <asp:Label runat="server" ID="lblFriendsEmail" AssociatedControlID="FriendsEmail">Friends Email: <asp:RequiredFieldValidator ID="RequiredFriendEmail" runat="server" ErrorMessage="Please enter your friends email address." ControlToValidate="FriendsEmail" Display="Dynamic">*</asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="ValidFriendEmail" runat="server" ControlToValidate="FriendsEmail" Display="Dynamic" ErrorMessage="Please enter a valid email address." ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator></asp:Label><br />
        <asp:TextBox ID="FriendsEmail" runat="server" CssClass="TextBox"></asp:TextBox><br />

    </fieldset>

    <fieldset>
        <legend>Your Details</legend>
        
        <asp:Label runat="server" ID="lblName" AssociatedControlID="YourName">Your Name: <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="YourName" ErrorMessage="Please enter your name.">*</asp:RequiredFieldValidator></asp:Label><br />
        <asp:TextBox ID="YourName" runat="server" CssClass="TextBox"></asp:TextBox><br />
       
        <asp:Label runat="server" ID="lblEmail" AssociatedControlID="YourEmail">Your Email: <asp:RequiredFieldValidator ID="RequiredEmail" runat="server" ErrorMessage="Please enter your email address." ControlToValidate="YourEmail" Display="Dynamic">*</asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="ValidEmail" runat="server" ControlToValidate="YourEmail" Display="Dynamic" ErrorMessage="Please enter a valid email address." ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator></asp:Label><br />
        <asp:TextBox ID="YourEmail" runat="server" CssClass="TextBox"></asp:TextBox><br />
       
        <asp:Label runat="server" ID="lblMessage" AssociatedControlID="YourMessage">Your Message</asp:Label><br />
        <asp:TextBox ID="YourMessage" runat="server" TextMode="MultiLine" CssClass="TextArea"></asp:TextBox><br />
    </fieldset>
warren
Posted: Sunday, November 25, 2007 7:44:17 PM

Rank: Addict

Joined: 7/19/2006
Posts: 820
Location: Benfleet, Essex, UK
Thanks Chris - learn something new everyday :)

Warren Buckley an Umbraco MVP 08-09 & level 1 certified developer
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.