How to change Contact Page field headers

May 5, 2009 at 8:11 PM
Edited May 6, 2009 at 7:57 AM
Hi,

I'm really enjoying working with the CWS and learning a lot (especially not having a background in web design or programming). I am sure this is a newbie question, but where do I modify the Contact page? For example, here in the U.S., we spell Enquiry as "Inquiry." Actually, I would like to change that heading to "Comments, Questions, or Concerns." However, I cannot figure out where to go to make these modifications. Thanks for your patience and assistance.

While I am waiting for a response, I have also noticed that I am having great difficulty in getting any text formatted as a sub header to stay in a "centered" paragraph. Whenever I save the document, it always reformats the text to left alignment. Also, I have noticed in the stylesheets that the way elements are coded (if that's the proper term) do not follow the same rules. For example, I have seen in the css things like this:

 font-size:11px;
 display:block;
(no spaces between letters, numbers and other characters)

and in other places, I have seen this:

 float: left;
 background: #fff;
(spacing after the colon)

Does it make no difference whether you use spacing after a colon or semi-colon? Or are the rules different for various elements?

Thank you.

Regards,
Lon Diffenderfer
lon 'dot' diffenderfer 'at' gmail 'dot' com
May 6, 2009 at 8:18 AM
I must be blind. I cannot locate the place where the Contact page headers reside in order
to modify them. No one has replied - maybe they are so deeply hidden that no
one can find them, but I doubt it. Viewing the source code in the browser doesn't help me
either. All I see are very long labels beginning with ct100_ct100_ct00. I really don't get it.

Oh well, time for some rest. Perhaps, someone will have answer for me later.

Regards,
Lon
"Diffie"
May 6, 2009 at 8:34 AM
Hello Lon,
Sorry for the late reply but I live in the UK and not awake 24/7 and have a day job this CWS is a personal project so you have to understand I can't reply as quick as I would like to.

In regards to your two questions you can edit the labels for the contact form in a .NET Usercontrol.

If you look at the template for the contact page in the settings section you will see the CWS_ContactForm macro inserted into the template.

<umbraco:Macro EmailTo="[#emailTo]" EmailSubject="[#emailSubject]" EmailBody="[#emailBody]" EmailReplyFrom="[#emailReplyFrom]" EmailReplySubject="[#emailReplySubject]" EmailReplyBody="[#emailReplyBody]" EnableSSL="[#enableSSL]" FormHeader="[#headerText]" FormText="[#formText]" ThankYouHeaderText="[#thankYouHeaderText]" ThankYouMessageText="[#thankYouMessageText]" Alias="CWS_ContactForm" runat="server"></umbraco:Macro>

If you goto the Developer section in umbraco and expand the macros section you will see a macro called which has the friendly name of [.NET] Contact Form and with the alias of CWS_ContactForm.

Macros are functionality you want to include in your website such as navigations, listing galleries etc which are normally done by XSLT as they are presentational and anything that requires a form or some advanced code such as talking to databases etc are written in a .NET usercontrol.

In this Contact Form macro you can see that it is using a .NET macro that is located at /usercontrols/website/ContactForm.ascx.

If you open this file in Visual Studio or Visual Web Developer Express you will be able to see the form and it's labels where you can edit the labels to your hearts desire.

In regards to the spaces between some CSS properties and not others this is me probably coding the CSS file over two different sessions where in one case I decided to use spaces after the property name and in the other I didn't, both work perfectly fine but I should have stuck to one way to keep it consistent.

I hope this helps you out.
Any more questions let me know please.

Thanks,
Warren


May 6, 2009 at 9:09 AM
Edited May 6, 2009 at 7:29 PM
Sorry, Warren,

It appears that you took my remarks as a personal criticism. They were not meant
that way. I probably shouldn't type when I'm tired.

Editing the information for the CWS inside umbraco was becoming so natural to
me that I did not even think about needing to edit the ascx file in Visual Studio.
Poor thought processing by me at this hour...

Thank you very much for the feedback, and again, my words were not meant to
appear as a criticism of you or anyone else. I'll try to be a bit more focused on
how I phrase things the next time, or just wait until I've had some decent rest.
8^)

Cheers,
Lon
May 6, 2009 at 9:12 AM
No offense taken at all Lon, I just needed to explain to you and others this is a personal project thats all.

Warren :)
Oct 29, 2010 at 2:07 AM

Hi Warren, I have just started using the CWS with Umbraco 4.5.2 and I am wondering if it is possible to reuse the contact us macro on page editor for other pages without using the template.

I have enabled use macro in editor and the contact form controls loaded well on the page but when I click submit afterclicking the contact form I get page not found error. However a page that uses the contact template directly works fine.

Please let me know.

BTW: Thank you for your work on the project it is very useful.