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.
- So now that you have downloaded iTweak, we can get started. Open iWeb.
- 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! - 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:
- 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:
- 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.
- Now, choose your site. You now have the ability, to use the two drop-downs to select your thanks and form page. Do that!
- 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.
OK I thought that maybe I should be a bit more descriptive. What I want to do is insert a form into iweb09 that uses my websites thank you page and doesn’t skip so another’s thank you page. Is there any HTML coding for forms that allows you to type in your redirection page and also the email address that the form will be sent to? I want to create three separate forms. 1# Join our emailing list 2# An application form 3# A comment form. I have found it really dofficult to find any info or HTML codes that can be dragged into iwebs HTLM snippet section.
I appreciate all your hard work helping us all out. More than happy to donate for your support!
Cheers, Billy
I am trying to add a contact page I did everything you said, but how do I actually find my “choose published site” I do not know how I select it. Any help would be great !!
Thanks
Dan
i’m using iWeb08. i got “Parse error: syntax error, unexpected T_STRING in /home/a6863493/public_html/index.html on line 1″ … anyone can help. PLEASE.
used it with iweb 08 and its brilliant and easy..this is the 3rd contact form ive tried to add and its the first one that works on all browsers. cheers.
I added a contact form with the latest version of itweak. Everythingn worked fine. But there’s e problem with the german characters (ä, ö, ü) they appear not correctly. I think the problem is the unicode (utf-8), which is not recongnized correctly by the e-mail client. Any ideas?
Having some trouble setting this up. I’m using iWeb to design but Godaddy to host, so i publish to a folder and them upload with FTP. When I use iTweak to attached the contact page and click the choose published site button exactly what am I looking for? I went to my published folder but the index.html file is exempt from being chosen. What am i doing wrong or should I just be choosing the folder under the HTML file?
Hey.
I’ve been using iweb to set up my own website, hosting my images / cv etc and your form works a treat! Many thanks, and best wishes wes
Thank you for awesome information.
But when I hit choose published site button I do not know how to navigate to the site
I am having a hard time putting this together. I have built 5 websites with iWeb, 4 using http://www.1and1.com as my server and the last one with my .mac account. I cannot figure out how to find my “choose published site” file.
I’ve downloaded iWebSites and that didn’t seem to help me very much. I’m extremely new to this. When I was using DreamWeaver the files were very easy to find and manipulate.
Does anyone else have this problem? Any help on how to figure this out would be much appreciated.
Thanks…
I have been using iTweak for some time now — great product!
Question… how can i put multiple forms in an iWeb site. I need different forms on 3 different pages of a site. Can I do this with iTweak? Just run the ‘discussion’ multiple times with the various pages? Would I need a different ‘thanks’ page for each?
Couple of problems.
The menu link to Contact, generated by iWeb, goes to Contact.html
That file, and the ThankYou.html file is generated by iWeb after publishing.
iTweek generates Carbery_Art_GroupContact.php, not in a folder called Carbery_Art_Group but as a file with that long name.
And it seems to delete the Contact and ThankYou html files.
There is no Contact.html so of course I get the error:
Carbery_Art_Group/Contact.html was not found on this server.
And I can’t change the menu link to php even if I manually make a folder and put the file in that.
Please help
Regards,
Ron
Could I use a PHP contact form to create an e-mail list. For instance, a page with the contact form having them fill out contact info. That way i can create an e-mail list from that? I don’t know if i’m on the right track with this. I tried it and it’s completely blank :-/. Thanks for your help.
Hey when i click on the contact page it just says would you like to download a fle. its a .php. HELP!!
Hi there, I’m kind of stuck halfway through. I have built the Contact and Thank You pages already. I open iTweak and go to discussion. I click on the button to “CHOOSE PUBLISHED SITE”, and it opens my finder browser- to my computer/files/etc… but I think I’m supposed o use an actual published page, like on my web server, but I cannot figure out how to choose that… am I supposed to link “CHOOSE PUBLISHED SITE” to a folder/file on my computer? Or on my online web server?
This does not generate anything for me, – but instead it deletes the two files!
I’m using iWeb ‘09 version 3.01.
Followed the instructions to the letter and the published pages only show the text entered, but not the form.
Has this been tested to work with iWeb ‘09?
Did everything as you described. I can see the contact form in safari but not in firefox. any ideas? (iweb 09, latest itweak, publish to folder and then upload)
please help!!!
O.k. – Sorry for my last post… Now it works.
But one mor question: can i edit the form (german text and more fields)?
Hey Max, I shot you an email regarding a problem
would love to add this to my site, so seeing how it works
I think that i am doing something wrong in the choose published site step. I am not sure how to do this step and then upload it to my provider justhost.com
Hi Max- thanks for creating this for us iweb users!
One snag…I am receiving the same issue as KURT(24 AUG 08 AT 11:39 PM)….I am also receiving an
>>> Error 403 – Forbidden
You tried to access a document for which you don’t have privileges.<<< on the contact page.
Is it possible for you to mail me the same fix you sent him?
Thanks a lot
I am using itweak 1.5.3, iWeb 1.1.2 2006
So cool portal design. What CMS do you use ?
Hi Max,
thanks first for the amazing tools you got here for us! The small difficulties make it more of a challenge – and what else can constructing a website be
So, well, I got a problem to publish the contact form as well.
As advised, I published intomy local folder, then processed with iTweak. Going onto my index.html on the local folder and clicking their on my contact site, the pretty contact form appears as wished. But: this does not work for the online version. I’m using xlhost.de and it got php4 and 5.
The contact form does not appear on the conatct site – only the copy pasted code.
So I have a look in Filezilla to check – and on the server I will find a contact.php AND a contact.html.
On the web version, I am redirected to the contact.html which contains the code only.
So I try:
delete the contact.html, I leave the contact.php and add replace the index.html by the one from the local server.
But when I go to the web version now, I am still redirected to the contact.html, but he doesn (obvisouly) not find it on the server anymore. And if a manually go to http://www.kosmonaut-booking.de/contact.php it will tell me:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, hostmaster@xlhost.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Can you help me or do I have to ask the host admin about php stuff?
Thanks a lot!
ps: I will undo the contact code in iWeb for the moment and upload it without the form – in order to make it look ok.
JOsi
again: .php doc works now online (I just had to switch to 705 instead of 775 rights)- but I cannot go there from the http://www.kosmonaut-booking.de/home.html site. It only opens the contact.html link. On my local server it works well. How that?
I tried to create the form, the contact form works fine. I tried to fill in the information on the contact page but when I fill it out and hit the send button the thankyou php errors.
Firefox can’t find the file at /Users/marcgraybush/Sites/www.video-pros.com/Thanks.php.
I’m using itweak on my site, specifically for the contact form. After some trial and error it now works great. Only problem I have with it is when a user doesn’t fill in all blanks they get a rather curt message with spelling errors. How do I change this automatic response?
Ive been at this all day and am at my wits end… I just cant make this work. Ive added the pages, put on the text boxes as it says above by just adding a new one and typing in what was shown here and published in iweb08. Downloaded the new version of iTweak, checked the add contact page checkbox and found the relevant html pages on my local published site folder. ITweak does its thing but it deletes the .html pages for the contact and thanks pages…. without the html pages for those i get 404 errors. I tried copying those html pages and then putting them back after itweak had done its thing but than all i get is the %%CONTACT_FORM_SUB%% text in the box on the page – at least i dont get 404s I guess. Ive tried the .php files in different folders and all sorts of what might be otherwise numpty things but all to no avail, Can anyone help me?
PS. hoster is GoDaddy on Linux, im using iWeb08
Im more confused than ever now… I did another build and its now just burst into life… ive no idea why… but i am happy!
But, as inflation proceeds, people begin to real- ize that prices are going up perpetually as a result of per- petual inflation. ,