iWeb Forms

Posted by: keymaker

iWeb Forms - 07/07/10 03:17 AM

I've got to the point where I need to place interactive forms on my Web site for various purposes e.g. 1. registration of persons wishing to take part in various projects and 2. educational dialogues for the kids trying to lean an academic subject at my site. I've got this book that explains how to make forms using PHP but I don't think iWeb supports the language... so my question is: how do I go about making an interactive form in iWeb? Thanks,

Posted by: Jim_

Re: iWeb Forms - 07/07/10 05:34 AM

No first hand experience but this or this may help if no one can help here. smirk
Posted by: keymaker

Re: iWeb Forms - 07/07/10 06:40 AM

Thanks, I'll check those out. Much to my surprise I got this to work on the input fields but the submit buttons didn't work - which I suppose is where HTML runs out and PHP kicks in:

{form method = “post” action= “docs.php}{pclass= “legend”}Personal information{/p}{fieldset id= “personal”}

{label}Name:{/Label}{input type=“text”
name=“name” size= “30” /}{br /}

{label}Address1{/Label}{input type=“text”
name=“address1” size= “50” /}{br /}

{label}Address2{/Label}{input type=“text”
name=“address2” size= “50” /}{br /}

{label}Town{/Label}{input type=“text”
name=“town” size= “50” /}{br /}

{label}City{/Label}{input type=“text”
name=“city” size= “50” /}{br /}

{label}Postcode{/Label}{input type=“text”
name=“postcode” size= “30” /}{br /}

{p id=“buttons”}{input type=“submit”
value=“Submit” /}{input type=“reset”
value=“Reset” /}{/p}

where { } = < >

Posted by: polymerase

Re: iWeb Forms - 07/07/10 07:34 AM

A complete shot in the dark. You don't have a closing html for the form=method. Stick a {/form} on the end.

Wait, you're using iWeb. iWeb doesn't contain the ability to make forms so you need a third party cgi or javascript. (Which I guess you must be using since you got this far. )

So it could be a simple nonclosing of an HMTL call. Are you using something like BBedit to colorize the HTML? It can be handy for figuring out where the messed up code is.
Posted by: keymaker

Re: iWeb Forms - 07/07/10 08:21 AM

Thanks - I had the closing form tag in the code but not in my post for some reason - cut and paste error. The actual form looks like this at the moment (below) but as you can see the submit buttons haven't worked. All I did was type up the code in Pages and cut and paste it into an HTML snippet which was obviously over-optimistic!

Posted by: polymerase

Re: iWeb Forms - 07/07/10 10:51 AM

instead of id="buttons"
{input type="button" value="Submit" / }

or, if your code is correct, it could be that the plural "buttons" is tripping it up
so try
{p id=“button”}{input type=“submit”
Posted by: keymaker

Re: iWeb Forms - 07/08/10 12:10 AM

Thanks, although it didn't seem to work. This is what one bloke says about getting PHP to process iWeb's HTML snippet:


What does he mean by: "At the root level of my website, I create a file named .htaccess..." ?