Formmail validated by HTML (2)

Date 2007-09-05 05:45:07 | Category: XOOPS

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.




You can read more news at PEAK XOOPS.
http://xoops.peak.ne.jp

The URL for this story is:
http://xoops.peak.ne.jp/md/news/index.php?page=article&storyid=438