PEAK XOOPS - News in englishin japanese

Archive | RSS |
  
Poster : GIJOE on 2007-09-06 06:31:17 (9767 reads)

in englishin japanese
Here is a document how to validate POST data via pure HTML.


(A) How to get POST's indexes should be received?

Just get "name" attributes in the HTML.
# Though it is difficult to treat array like hobbies[], I skip it now.


(B) How to get field's title?

This system gets field's title from <label> corresponding the <input> from HTML.


(C) How to judge whether the field is essential or not?

This system judges them by their filed's name.
If a field contains '_required' in its name, the field will be regarded as essential.
refer the sample HTML in (1).
The field of 'name_required' is essential.


You can specify validation rule by "class" of <input>. (pico >= 1.51)
refer the sample HTML in (1).
<input> for 'name' has the class of "required".
Then the field will be essential.


(D) How to do "TYPE-SAFE" or "TYPE-AUTO-CONVERSION"?

This "type" contains not only int,double,string etc, but also "telephone number","email address" etc.

This system judges them their filed's name like (C).
eg) if a field contains 'email' in its name, the field will be validated as "email address".


You can specify validation rule by "class" of <input>. (pico >= 1.51)
refer the sample HTML in (1).
<input> for 'email' has the class of "email".
Then the field of 'email' will be checked by the rule of RFC2822.

Of course, you can specify classes multiply.
If an <input> has class="email required", the field will be essential AND validated as "email address".


Poster : GIJOE on 2007-09-05 05:45:07 (9904 reads)

in englishin japanese
The sample code shown in yesterday can be simplified like this.


<{capture}>
<form>
	(form controllers)
</form>
<{/capture}>
<{formmail}>

You have to check the skelton.

"The plugin <{formmail}> parses the form HTML captured by <{capture}> block. Also <{formmail}> receive POST and store SESSION. Then <{formmail}> outputs rewritten form HTML"

eg) <form> will be added proper attributes of "action" and "method".
Of course you can specify action and method by yourself.
<form action="/modules/pico/form.html" method="POST">

You can write "form controllers" as you like.
But you should follow the rule of XHTML.

- write tags with small letter
- write `selected="selected"` fully instead of `selected`
- close the tags like <input .... />
- write <label> corresponding each inputs.

<{formmail}> judges <label> as the title of the input.
The title for an input without <label> will be its "name" attributes.

You can write default values as you like. they are overwrite automatically.

This documentation is for HTML designers.
(3) will be a documentation for programmers.

0 comments

Poster : GIJOE on 2007-09-04 06:00:47 (15743 reads)

in englishin japanese
I implemented "Formmail validated by HTML" for pico 1.50

You may ask "What is new?"

OK.
This system uses Template data written by HTML designer as "Validator".
You need not XML definition etc.

And I don't value the module like liaise or class of XoopsForm, because such HTML generating system kills the liberty for HTML design.

I believe this system makes both designers and programmers happy.

Anyway try to make a contents like this.

Filters: Turn 'Smarty(XoopsTpl)' on.
All of the rest options should be turned off.
(Also "body cache")

Read more... | 1319 bytes more |9 comments

Poster : GIJOE on 2007-08-29 03:53:03 (9357 reads)

in englishin japanese
Sorry, No english content.

0 comments

Poster : GIJOE on 2007-08-24 06:37:24 (8314 reads)

in englishin japanese
With d3pipes>=0.54, you can send Ping from any pipes just inserting Ping joint.

You should know the ping rule of d3pipes.

- Minimum interval is 30 minutes.
- Just send a ping when the data in pipe is different from previous ping

And you shold also check whether the pipe is active/public.
Both RSS/DISP should be checked in pipe admin.

0 comments

« 1 ... 6 7 8 (9) 10 11 12 ... 55 »
Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!