PEAK XOOPS - Formmail validated by HTML (4) in englishin japanese

Archive | RSS |
XOOPS
XOOPS : Formmail validated by HTML (4)
Poster : GIJOE on 2007-09-08 18:16:34 (9391 reads)

in englishin japanese
In pico-1.51, the rule for "Form validated by HTML" has been changed radically.
read (1)~(3) again, please.

These are the new rule of the system for HTML designers.

Name of the field
It is "name" attribute.
You can also use linear array by just adding [] after the name.
eg) name="favorite_fruits[]"

Title of the field
The 1st option is <label> corresponding the <input>.
While the 1st option for "checkbox" or "radio" will be <legend> inside <fieldset></fieldset>
2nd option is "title" attribute in the tag.
Last option is "name" attribute in the tag. (same as Name)

essential
Specify it by class attribute.
eg1) <input ... class="required" />
eg2) <input ... class="required int" /> // "int" AND "required"

Type
Specify it by class attribute.
Only a type can be valid.

- int
-- filtered by intval()

- double
-- filtered by doubleval()

- singlebytes
-- filtered by mb_convert_kana( ... , 'as' )

- email
-- checked by RFC2822. an error will be raised if it is invalid.

- telephone
-- characters unused as telephone number will be removed.



Related articles
Printer friendly page Send this story to a friend

Comments list

GIJOE  Posted on 2007/9/28 5:31
hi-debowさん、こんにちは。

Quote:

フォームメールを使用するために色々テストをして気が付いたのですが、class="int required"の時に未入力だった場合テキストエリアに0が帰ってきます。
ああ、確かにそれだと、一般に期待される動きとは違いますね。

このあたり、実は結構嫌らしい部分ではあるのですが、なんとかうまく修正してみます。
hi-debow  Posted on 2007/9/27 14:37
GIJOEさんこんにちわ。

フォームメールを使用するために色々テストをして気が付いたのですが、class="int required"の時に未入力だった場合テキストエリアに0が帰ってきます。

これはこういうものなのでしょうか?
お忙しい所細かい事ですが、気になりましたのでご報告いたします。
Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!