ContactUs Control

This forum is where we'll mirror posts that are of value to the community so they may be more easily found.
User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Fri Oct 09, 2009 4:11 am

Could you post error here. Make sure that from code suggested by Judy you removed this line [Add this].

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: ContactUs Control

Post by compunerdy » Fri Oct 09, 2009 9:31 am

I went to check and figured it out. The word text must be capitalized Text in her code example.

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: ContactUs Control

Post by compunerdy » Mon Oct 12, 2009 11:58 am

Anyone know how to make this send along a IP address as well so we can ban spammers?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Tue Oct 13, 2009 6:54 am

compunerdy wrote:Anyone know how to make this send along a IP address as well so we can ban spammers?
In the code locate

Code: Select all

mailMessage.Body += "Name: " + FullName.Text + Environment.NewLine;
and make it look like as below

Code: Select all

mailMessage.Body += "Name: " + FullName.Text + Environment.NewLine;
mailMessage.Body += "IP Address: " + HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] +Environment.NewLine;

User avatar
draneb
Captain (CAPT)
Captain (CAPT)
Posts: 314
Joined: Sun Jun 12, 2005 4:07 pm
Location: Texas
Contact:

Re: ContactUs Control

Post by draneb » Fri Jan 22, 2010 1:40 am

jmestep wrote:On a contact form I made, I moved the message up above the send button so it would be more obvious that it was sent. I also cleared the fields in the form after the message was sent. I think you could do that in this one in this section of code:
try
{
MessageLabel.Text = "Message Sent";
MessageLabel.CssClass = "goodCondition";
EmailClient.Send(mailMessage);
[Add this]
Email.Text="";
Name.Text="";
Comment.Text="";

}

Maybe with combination of both, the customer would realize that the message had been sent without your having to make a confirmation page.
[edited to capital T in Text]
Hello,

I also get 3-4 contact us messages each time. One customer was so kind to hit the Submit button 23 times because he was upset at us.
I have played around with Judy's code to clear the fields but I can not get it to work.

Could someone please tell me how to clear the fields on the Contact Us form that Mazhar has posted in the thread?
Thank you very much!
AC 7.0.3 build 13937

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Fri Jan 22, 2010 7:19 am

:) Which version of control you are using. On the 2nd page in this thread I have posted a variation that shows a message to customer by hiding the contact-us if message is sent successfully. That was posted a long ago but I think that it will clear all fields. Second option could be to refresh the page automatically upon button click after sending message. For example
you can put following line

Code: Select all

Response.Redirect(Request.Url.ToString());
under SubmitComment statement.

rlopez
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 96
Joined: Mon Mar 15, 2004 1:08 pm
Contact:

Re: ContactUs Control

Post by rlopez » Sat Jan 12, 2013 12:03 pm

I know that this is an old post but hope someone may have some input regarding this form that was built for Able 7X. I'm trying to get this form to work in Able Gold and have not had any success. I thought that Able 7X and gold were the same platform and this form should be able to run under the same Commercebuilder.dll with any customizations.

I'm trying to use the (Extended ContactUs) with Captcha. After installing the files provided ContactUs.ASPX and .CS files into the ConLib directory per the instructions I'm receiving this error when trying to run it.

[[ConLib:ContactUs SendTo="info@mystore.com" ]] Could not load file or assembly 'CommerceBuilder.Web' or one of its dependencies. The system cannot find the file specified.

Has anyone upgraded from AC7X to Gold and found that this ContactUs control had to be modified to work with Gold. Thanks for any feedback or help on this subject. I'm posting this in this forum becasue of the lengthy discussion on it.

Rick L.
Rick L.
https://www.boatingsolutions.com
We make boat repair easy!

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: ContactUs Control

Post by jmestep » Sat Jan 12, 2013 1:15 pm

Able Gold is a complete rewrite of the base. I have updated a few conlibs and had to change something, but I don't remember exactly what. I am using something like the following as the conlibs in AbleGold do now.
public partial class ConLib_W2MZoomProductImage : System.Web.UI.UserControl
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

rlopez
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 96
Joined: Mon Mar 15, 2004 1:08 pm
Contact:

Re: ContactUs Control

Post by rlopez » Sat Jan 12, 2013 1:35 pm

Judy
Thank you so much for the info. I had figured that this was probably the case do not being familure with AC7X and now Gold. I will post all further questions on this subject in the Gold forum.
Thanks again for your help.

Rick L.
Rick L.
https://www.boatingsolutions.com
We make boat repair easy!

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Thu Jan 17, 2013 11:00 am

ContactUs control version supporting AbleCommerce Gold is now available here viewtopic.php?f=47&t=17102

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Mon Jan 21, 2013 6:01 am

All version of contact us control that were posted in thread are now available for gold as well. Please refer to following thread viewtopic.php?f=47&t=17102

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Tue Jan 22, 2013 6:26 am

jmestep wrote:Able Gold is a complete rewrite of the base. I have updated a few conlibs and had to change something, but I don't remember exactly what. I am using something like the following as the conlibs in AbleGold do now.
public partial class ConLib_W2MZoomProductImage : System.Web.UI.UserControl
I have posted some common issues and how to fix them while porting ac 7 codes here viewtopic.php?f=47&t=17108

Post Reply