PHP Form

Hi All,

I want to put some form data directly into a database. I have hand coded the PHP and it’s working fine, I just can’t find any way to tell the form which PHP file to call as form action and which method to use. At the moment I am creating the form separately, manually editing the resulting file to add the form action and method, and pasting into a HTML markup Item.

Is there a simple way to tell my page/form which PHP file to call, and to set the method to “post”? An extra quirk, tabbing through the fields is going reverse direction. Start at the top, hit tab, and it moves to the bottom field and works its way up.

A sample page is here - http://www.torchbeta2.com/Competitions/competitions.html

Many thanks,

'k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On May 14, 2012, at 10:03 PM, Kim Kohen wrote:

Hi All,

I want to put some form data directly into a database. I have hand coded the PHP and it’s working fine, I just can’t find any way to tell the form which PHP file to call as form action and which method to use. At the moment I am creating the form separately, manually editing the resulting file to add the form action and method, and pasting into a HTML markup Item.

Is there a simple way to tell my page/form which PHP file to call, and to set the method to “post”?

In the Page menu, choose Form Setup. You can set the method (GET/POST) and the action (the path to your script).

An extra quirk, tabbing through the fields is going reverse direction. Start at the top, hit tab, and it moves to the bottom field and works its way up.

It sounds like you have drawn each field on the page as a separate layered item. Your best results will come from laying out your form in a table object. Draw a table with at least two columns and as many rows as you have fields. Put a label for each field in the left column, and the field in the right (cut and paste will do this). This gives you two huge usability wins: first, the form elements will appear to be a different size in almost any browser or platform, and there’s nothing you can do about that. The table will flex so that they don’t overlap one another and become unusable. Second, anyone who is using screen-reading software (visually disabled/blind) will be able to make sense of the form, because the label and the field it relates to will be physically joined to one another through the table structure. Even if you don’t anticipate too many blind visitors, remember that Google is blind, too.

Walter

A sample page is here - http://www.torchbeta2.com/Competitions/competitions.html

Many thanks,

'k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter,

I want to put some form data directly into a database. I have hand coded the PHP and it’s working fine, I just can’t find any way to tell the form which PHP file to call as form action and which method to use. At the moment I am creating the form separately, manually editing the resulting file to add the form action and method, and pasting into a HTML markup Item.

Is there a simple way to tell my page/form which PHP file to call, and to set the method to “post”?

In the Page menu, choose Form Setup. You can set the method (GET/POST) and the action (the path to your script).

Completely missed that - I was looking for an Action…

An extra quirk, tabbing through the fields is going reverse direction. Start at the top, hit tab, and it moves to the bottom field and works its way up.

It sounds like you have drawn each field on the page as a separate layered item. Your best results will come from laying out your form in a table object. Draw a table with at least two columns and as many rows as you have fields. Put a label for each field in the left column, and the field in the right (cut and paste will do this). This gives you two huge usability wins: first, the form elements will appear to be a different size in almost any browser or platform, and there’s nothing you can do about that. The table will flex so that they don’t overlap one another and become unusable. Second, anyone who is using screen-reading software (visually disabled/blind) will be able to make sense of the form, because the label and the field it relates to will be physically joined to one another through the table structure. Even if you don’t anticipate too many blind visitors, remember that Google is blind, too.

This is how I did it originally and I was having major issues tying to get it formatted correctly - I eventually relented and went layered items. I might give it another go when my patience has repaired itself. I’m still intrigued as to how the tab order is set - I might try to recreate it and see if that fixes it.

And thanks for the help - I’ve chipped in some beer money as well :slight_smile:

'k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

In a layered layout, tab order is governed by the stack order of the elements on your page. If you click on the Site pane header, it will change to Page, and you will see a hierarchical list of all elements on your page. The items closest to the top (the page name) are the first in source order, and the ones nearest the bottom of the list are last. Counter-intuitively, to get an element to the very top of the list, you use Item/Send to Back, and for the very bottom, Bring to Front.

But please, use the table. You will thank me, or more properly, when you see your site in Windows Firefox you’ll thank me.

Walter

On May 14, 2012, at 11:48 PM, Kim Kohen wrote:

I’m still intrigued as to how the tab order is set - I might try to recreate it and see if that fixes it.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 15/05/2012, at 1:58 PM, Walter Lee Davis wrote:

In a layered layout, tab order is governed by the stack order of the elements on your page. If you click on the Site pane header, it will change to Page, and you will see a hierarchical list of all elements on your page. The items closest to the top (the page name) are the first in source order, and the ones nearest the bottom of the list are last. Counter-intuitively, to get an element to the very top of the list, you use Item/Send to Back, and for the very bottom, Bring to Front.

But please, use the table. You will thank me, or more properly, when you see your site in Windows Firefox you’ll thank me.

No worries, thanks.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options