Skip to main content
Participating Frequently
September 9, 2020
Question

Code for submitting a simple contact form to my email

  • September 9, 2020
  • 4 replies
  • 6104 views

I am a semi-luddite in regard to code, however I have managed to successfully build a site in html (yes, I was told no one does that anymore). I have a contact page that asks for Name, Address, and Comment. I don't know how to get it to send the information to me. I worry that my email will be exposed to spammers and don't know enough about how to prevent that. I have been doing research, but my eyes begin to cross when reading coding instructions on sites, and I just don't understand it. Can someone either point me in the direction of clear instructions for newbies, or actually give me the code that I can put in my document? I used DW's form feature to make the three text boxes. In fact, I'll add the code below if that would be helpful. Thank you so much in advance for your help.

Catherine

<label for="name"><strong>Name:</strong></label>
<input name="name" type="text" id="name" size="80">
</p>
<p>
<label for="email" style="font-weight: bold; font-size: 24px;">Email:</label>
<input name="email" type="email" id="email" size="80" maxlength="80">
</p>
<p>
<label for="comments">Comments or Questions:<br>
</label>
<textarea name="comments" cols="90" rows=15 wrap id="comments"></textarea>
</p>
<p>
<input type="submit" name="submit" id="submit" value="Submit">
<input type="reset" name="reset" id="reset" value="Reset">

(My website is live: http://www.catherinecampaigne.com/contact.html)

This topic has been closed for replies.

4 replies

Legend
September 12, 2020

OP - (l have managed to build a website in html (yes, l was told no one does that anymore)

 

Just to clarify, the best developers still build website using traditional workflows, the poor ones, mainly those who have entered the game in the last decade or so depend on frameworks and libraries. Thats ok until something goes wrong, as it will, at which point they wont have a clue how to resolve the issue. Beyond following instructions like programmed robots they are virtually devoid of any real skills relating to web development. The pay grade is quite poor as well given there is an ocean of poor web developers which drives down the amount of financial return that they can command.

Nancy OShea
Community Expert
Community Expert
September 12, 2020

"The pay grade is quite poor as well..."

That all depends on where you live and who you work for. 

 

According to ZipRecruiter.com, the average annual salary for a web developer is:

United States: $75K. 

Los Angeles: $79K

Chicago: $83K

New York: $89K.

 

According to Glassdoor.com, the average salary

Google: $118K

LinkedIn: $129K. 

Brigham Young University, Utah: $14/hour.  

 

Location, location, location.

 

Nancy O'Shea— Product User & Community Expert
Legend
September 12, 2020

Big City players always pay more as the cost of living is deemed to be more, one also has to factor in hours of travelling on a crowded train if you dont live in the City which costs £1000's per year, so I expect to see above average wages in those locations.

 

Outside of 'town' the pay package drops substnatially to between 22k-35k a year for your average developer, the likes of you and me and probably the majority, hardly big money these days.You probably wouldnt be able to get a mortgage based on that salary after tax, travel, living costs etc.

 

Have you looked at any job adverts recently and observed what skills they require for 65k-75k grade pay, a bloody genius.

 

Humm its widlly inaccurate - Utah University $14 dollars an hour!!. You'd have to work all night and all day, plus some to make even 35k a year, let alone glassdoors.com drunken guess at the average salaries.

£11/hour in UK money x 12 hours a day that makes me £132.00 x 7 days = £952.00 a week, assuming I dont keel over and die of exhaustion and that still only comes to 48k per year.

 

Is Utah a dirt cheap place to live??

 

Just doing a bit more research indeed.co.uk suggest the average UK web-developer salary is £33,178 per year

 

https://www.indeed.co.uk/salaries/web-developer-Salaries 

 

But I guess its all relevant in terms of the cost of living in each location. The cost of a pint of beer is about £3.70 here. In New York it appears to be about £7.00 so you would probably need an 89k salary just to have a good night out!

 

 

 

 

 

 

Nancy OShea
Community Expert
Community Expert
September 10, 2020

 And I am moving your duplicate post out of view as it only confuses people. 

 

Ask your hosting provider if your plan supports PHP and the PHP mail () function. If it doesn't, you'll need to find another solution like this mail sending library on GitHub which supports SMTP authentication and a lot more.

https://github.com/PHPMailer/PHPMailer

 

Creating secure contact forms and processing scripts are no trivial matter.  What you don't know can hurt you and your site.  When in doubt, don't risk it.  Use a 3rd party form service like Wufoo.com or Jotform.

https://www.wufoo.com/

https://www.jotform.com/

 

Nancy O'Shea— Product User & Community Expert
Participating Frequently
September 11, 2020

Thanks Nancy. Even some of the answers are confusing. I'll check out wufoo and jotform.

Catherine

 

Nancy OShea
Community Expert
Community Expert
September 11, 2020

No offense intended but if you think OUR answers are confusing, just wait until you're faced with a serious problem you can't get out of.  If you don't know how to code and you don't understand the terminology, what will you do then?

 

Incidentally, there's a lot more to building good websites than pretty pictures. 

 

1. Your server is not secure.  That's a problem.  Most people won't share information over a non-secure HTTP server, nor should they.   Ask your hosting provider about SSL/TLS certficates.  Even free ones from Let's Encrypt are better than nothing.

 

2. Your site contains no REAL TEXT that search engines, language translators and screen readers can see. Images of text are a usability nightmare.

 

3. The code is a shambles.  Did Photoshop generate this for you?  That's OK for a quick prototype to show the client but it won't work for production.  Here's why, you've got almost 100 code errors on just one page.

https://validator.w3.org/nu/?doc=http%3A%2F%2Fwww.catherinecampaigne.com%2Fshamanism-whatis.html

 

4. Your site is built with fixed-width tables.  It's not responsive.  Google penalizes sites that aren't mobile & tablet-friendly.  Sites must perform well for all users, no matter which devices they have.  You can't do that efficiently with tables.

 

I could go on but I think you get the picture.  Contact forms are the least of your worries. You have much more work ahead.  Start learning HTML and CSS.

 

Nancy O'Shea— Product User & Community Expert
BenPleysier
Community Expert
Community Expert
September 10, 2020

In answer to your other post which asks if you can use Alt-Web Design & Publishing: Responsive Contact Form with Bootstrap 3.2 and PHP (Part 1), the answer is yes with the proviso that styling is ignored. The tutorial was written for a previous version of Bootstrap.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Community Expert
September 9, 2020

You will need something to process your form.  Many hosts offer these to free and you would simply just replace the form action with that processor.  There are also form solutions out there you may want to consider depending on your needs. If you are looking at just gathering clients names to store in a CRM, you could integrate a Hubspot form and that could act as your form and CRM for you. I would not recommend using their free emailing tool though, many tend to get banned as the regulations on that part are very extreme.

 

A few comments from your site initially looking at it.  All the text is contained within an image. Because of this you site will most likely be ignored by search engines as there is not readable text on the page. In addition that font is difficult to read as there is not a lot of contrast between the font colors and the background.  

Participating Frequently
September 11, 2020

Thanks!