AdsGet US iTunes gift cards instantly!Get cool iWeb Templates!

Adding a Contact Form to iWeb

Have you ever wanted one of those fascinating contact forms right in your site? It isn’t that hard if you code your sites yourself – but with iWeb, getting and adding one becomes a bit more difficult. With this tutorial, I will aim to show you in a very simple way how to easily and rapidly add a cool PHP contact form right to your iWebsite.

For this tutorial, we will be using a free application called iTweak. You can go ahead and download it right here.

Please note that this tutorial will require the use of a PHP capable server. Otherwise, the tutorial and the form will not work. .Mac, sadly, is not capable of PHP. All those who don’t have PHP support, can take a look at a simple HTML snippet ready code from Wufoo.

The finished form will have a name, email, website field and a textarea for people to type their message. The style will apply to the theme you are using in iWeb. Simply try it out and you’ll see how it looks.

See the demo page for the result.

  1. So now that you have downloaded iTweak, we can get started. Open iWeb.
  2. Add two new pages. The first page will represent the page where you will have the actual form for visitors to fill in.
    The second page will be the page where people will be redirected to if they have successfully submitted their page. Also known as the “Thanks for your mail” page. The thanks-page should not be included in the navigation bar or no links should directly link to this page.
    You can give the two pages any names you like – but remember them and be sure to know which one is which!
  3. In the first page, so the form-page, add a new text-box. The text-box should have the dimensions of around 400px wide and 270px high. In this text-box, you will later find the form.
    In the text-box, without changing any of its style (ie.: borders, colors, fonts), type in the following keyword:
    %%CONTACT_FORM_MAIN%%
    See this image:

  4. Now let’s move on to the second page, the thanks page, again, create a text-box. This time the dimensions do not really matter as we will just have a short line thanking the visitor for the message. Then, without changing any of the text-box’s style, write the following right into it:
    %%CONTACT_FORM_SUB%%
    See this image:

  5. Now publish your site and open iTweak. After the publish, iWeb is no longer needed.

    In iTweak, navigate to the “Discussion” tab and at the bottom you will have the ability to type in your email. Jam it right in the box.

  6. Now, choose your site. You now have the ability, to use the two drop-downs to select your thanks and form page. Do that!
  7. Now, make sure you have ticked the option to add the contact form and hit the publish button! Upload the files to your server and try the form! The form will not work if you view your site on your Mac (remember, it’s not a server).
    Lastly, if you have any errors, please contact me via email and do NOT use the comments form below!!!

Looking for iWeb Templates? Check out my huge collection right here.

If you have enjoyed this article and you wish to make a small donation, then feel free to do so by clicking here.

82 Responses to “Adding a Contact Form to iWeb”


  • I did the contact form and all I see is the codes I put in the text boxes nothing is working yet . it processed the site without a problem , and I uploaded afer that and not working for me, I have godaddy so I have php.. do you knwo what it could be?

  • now I have this error when I hit contact

    Parse error: parse error, unexpected T_STRING in /home/content/C/n/y/Cny1969/html/sites/markarcarophotography/Mark_Arcaro_Photography/Mark_Arcaro_PhotographyContact.php on line 1

  • the wierd thing is there is nothing in the file .php like it wasnt even written yet

  • there both just blank

  • Hi max…
    i ran into the same problem i think. The %%CONTACT_FORM_MAIN%% text box is a separate one… i made no changes to it’s style, and it does not work. The server is php capable. any suggestions?

    btw… great job so far man.

  • Hi max,
    This seems to be a bit of any issue. I’ve tired following your tutorial to the letter over and over and over again, but I still have no joy. =(

  • Excellent news! Thanks Max! =)

  • Hi Max,

    I can confirm that the Contact form works with iTweak 1.4. However, the Thankyou page still just shows %%CONTACT_FORM_SUB%%
    Also, is there a way to limit the size of the message box as if the user expands the message box to a size larger than the allocated 400×270, then it becomes impossible to click ‘Send’, even though it is still visible.

    Kind Regards,
    Neil.

  • Awesome job Max. Thank you so much.

  • Thanks Max! Good work! =)

  • This is absolutely a beautiful tool… and exactly what I wanted to integrate it into my site! Works even better than other types of email forms, which require the .cgi ….
    Many thanks!

  • so i’ve tried to do this- but it doesn’t seem to work- all i get is the text I’ve typed in… any help would be great

  • I’m really excited about this and it works so easily. I have an off-white background on my page. Is there a way to change the font color?

  • Is there any way to change the fields of information for the contact information? For example the wording “your email and the overall size of the information boxes to collect data?

    Great job otherwise, works like a charm, just want to change a few things to work for my site.

  • Hi Max – I have looked all over the internet for something like this. Thanks for making it available.
    could you please help me with this error?

    thank you
    ramesy

    Parse error: syntax error, unexpected T_STRING in /home/content/s/p/i/spiritmanram23/html/Prayer_Request.php on line 1

  • same problem as above and i’m using v.1.4.5. thanks.

  • I added two pages to my iWeb one called Add_Contact and the other Thanks and followed all the instructions. But now the website does not load. When I give the full url c-connection.biswas.ch/Add_Contact to check I get the follwoing message

    Parse error: syntax error, unexpected T_STRING in /home/biswas/www/c-connection/Add_Contact.php on line 1

  • Any luck with modifying iTweak so it takes the style from the text box?

    Apart from this, absolutely brilliant!!

  • I tried this and did everything it said and nothing shows up on my website. Also, I tried using iTweak to add google analytics to my page, but it is not working either. I have followed both tutorials and nothing is working. When I look at the page info on my computer it is in the html files, but when checked on the website itself nothing shows.

  • It worked fine very first time I tried.

    Thanks a lot.

  • Amazing program. Thank you so much… I can’t believe how well it works….

    I even got to edit the files as I pleased… just one question… how do I change the code so that it will send to multiple e-mails??

  • Well done – thx

    You app crashes if I try to use it again afetr I use it once, btw. I need to quit and restart each time. That’s OK…

    Can I change fonts? I know enough PHP, but is that the best option? Then every time I make a change I need to:

    a) use iweb
    b) use itweak
    c) again add php changes

    seems that there must be a simpler way?

    michael

  • After about 2 hours of fighting this, I can’t get the contact form to work. I’m getting an Error 404 on my contact page. I use iTweak to create a contact form for at least five other sites, and it works great, just not on this one. Here’s the site: http://www.iasricf.org

    Any ideas?

  • When I run iTweak, it deletes my contact.html files, thus the error 404. Any suggestions?

  • I’m running iTweak 1.5.0

  • Hi, I installed the code for a Contact form, and everything worked absolutely great. I even tried to send myself an e-mail through it and it worked beautifully.

    Only issue is, now that I’ve sent an e-mail from this computer, I only see the code again on the page. My second computer…the same thing happened. On the third computer, which I haven’t sent an e-mail from yet, the form does indeed load. Does the form only work once per computer…or does it take a certain amount of time to re-set, or what?

    Any suggestions?

    Thanks so much. It looks absolutely great. I just hope I can get it to work smoothly besides these issues!

  • Max, Installed and works a treat, great work. Thanks

  • hello,

    I have run through this a few times and get the error
    file copy error
    There has been an error while trying to complete the file copy routine.

    I also had trouble using the zoom effect with pictures.. PLEASE HELP!! : )

  • It appears that it works..I checked on a pc….but when i submit contact details…it says ‘method not allowed’. I am publishing to a folder and then uploading with forklift via reg 123 hosting.
    Please help me Max!! Jamie

  • I have mailed you x2 Max, just posting here in case someone has the solution?

    How does iTweak update the contact form? – as you can see I have your text in it…..
    http://www.hurricaneforce12.com/Site/Contact_Us.html – that is the page I am trying to get the php contact form.

    The site is on a Unix server which is fully php compatible.

    When I press ‘process site’ on iTweak, should I not ftp the details up to my server – or does it all happen at your end???

    The problem I had yesterday I have partially solved, by choosing the the files from the original folder, as I am unable to choose the .html file termination itself, as it is blocked out grey. Is this the issue? The grey files are blocked and seem un-clickable – what am I doing wrong???

    Cheers, Ben

  • Despite x2 e-mails directly and the above post, have sadly had to abandon iTweak due to the lack of response, and it not working.

    Only solution I have sound that works is Wufoo : http://www.hurricaneforce12.com/Site/Contact_Us.html

    -Ben

  • You can also create iWeb Forms for free with the combination of Google Forms and Sprout. Details on how to create custom iWeb forms for free.

  • Works great! I want a Cc copy of the message to be also sent to the visitor. I appreciate your kind help in this. Thanks in advance.

  • I keep getting these errors:
    “There has been an error while trying to create a backup of your site.”
    “There has been an error while trying to add the hitcounter.”
    “There has been an error while trying to add the contact form.”
    Then the progress bar finishes and I hear a bell as if the task has been completed.
    ???HELP??

  • Hi! I am from Germany. Therefore I have got the question: am I able to translate the Thank you page and the titles of the contact form into German? It would we great !!!

    It works fantastic and so easily :-)
    CONGRATULATIONS !!!

  • I have been trying to get this to work. All i get is an error page when it is published. I have went through and have redone it many times and nothing. Any trouble shooting tips?

    jeff

  • not counting [url=http://www.oneview.co.uk/url/details.jsf?urlId=114905]buy cialis[/url] ungenuine

  • Hello,

    what have I done wrong? When I click on “Contact Form” on my website, it only shows “%%CONTACT_FORM_Main%%”

    Please help.
    Sven

  • Is this going to work on iWeb3.0 aka iWeb’09?
    Planning updates?

  • i’ve got it… the latest version doesn’t work with iweb09.
    You have to download an earlier version at:
    http://www.apple.com/downloads/macosx/internet_utilities/itweak.html

    This one works!

    Grtz
    Gille

  • I am able to see the contact box and everything but am not receiving e-mails for inquires from that box…. any suggestions?

  • Great Job! Thanks a lot

  • I am getting nothing but the text I am typing in with iWeb 09. I even tried the older version of iTweak. Do I publish to both a folder and my ftp server?

  • How is the mail being sent out? Postfix? Sendmail? Can this be configured?
    I can post the form, but email is never received – no connections made to the receiving mailserver.

  • Nice app! Works well. Pity it can’t handle unicode text :( Maybe this is a simple tweak?

  • Hi there.

    Ive tried yo make the contact form at my site and its cool. But the send button do not work ? Any idea why ?

  • I solved the problem.. :-)

  • Hi there. I am using iweb 09 and wanted to know if the same process is still needed. I have created the two new pages but when I go to iTweak I cant find the pubished site. I have gone through the library to the domain but it wont let me open it. Any Advice?

Comments are currently closed.