|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
katana Smarty Rookie
Joined: 17 Apr 2003 Posts: 26 Location: France
|
Posted: Wed Jul 30, 2003 10:03 am Post subject: Formsess, a smarty driven forms toolkit |
|
|
I have published today a new version of formsess, my smarty driven forms toolkit.
The official website is http://www.katana-inc.com/formsess/
Features:
- XHTML compliant syntax based on standard HTML form tags
- data persistance using sessions: valid values are stored and restored when a form is displayed again, and error messages are transmitted between pages
- Object oriented interface from the PHP Code
- Server & Client side validation with custom error messages
- extensible validation framework
The main advantage when compared to other forms system is that it uses smarty prefiltering feature as much as possible in order to provide an intuitive and elegant API.
There is a small and incomplete demo on the site, on the contact page. It only demonstrates client side validation methods, but I will finish it this week, and add a real demo with source code.
The documentation is not up-to-date, so feel free to ask any question here, i will help |
|
Back to top |
|
marco5 Smarty Rookie
Joined: 28 Jul 2003 Posts: 19
|
Posted: Wed Jul 30, 2003 12:06 pm Post subject: |
|
|
what is it used for? |
|
Back to top |
|
katana Smarty Rookie
Joined: 17 Apr 2003 Posts: 26 Location: France
|
Posted: Wed Jul 30, 2003 12:29 pm Post subject: |
|
|
err... in fact the easiest way would be to read what's written on the website
But as a quick description, i would say that it creates a developer-friendly interface between your PHP code and your template to manipulate forms.
The data is assigned from the PHP code, so no need to create smarty variables in your form, you just assign a value using the formsess class:
script
Code: | <?php
...
$fs = new formsess('foo');
$fs->assign('bar', 'somevalue');
...
?> |
template
Code: | <fs:form name="foo" method="POST" action="action.php">
<fs:input type="text" name="bar" />
</fs:form> |
When the following form is displayed, somevalue is used as the text field value.
In the same way, any entered data can be stored using sessions and automatically re-entered in the form.
It also handles server & client side validation, with custom error messages.
I will post a reply to that post as soon as a serious demo is on the site. |
|
Back to top |
|
marco5 Smarty Rookie
Joined: 28 Jul 2003 Posts: 19
|
Posted: Wed Jul 30, 2003 12:41 pm Post subject: |
|
|
sorry
i still can not get the point!!
|
|
Back to top |
|
katana Smarty Rookie
Joined: 17 Apr 2003 Posts: 26 Location: France
|
Posted: Wed Jul 30, 2003 1:00 pm Post subject: |
|
|
it will be easier to understand as soon as there is a demo online, i think. A good demo is better than a huge explanation : |
|
Back to top |
|
marco5 Smarty Rookie
Joined: 28 Jul 2003 Posts: 19
|
Posted: Wed Jul 30, 2003 1:01 pm Post subject: |
|
|
katana wrote: | it will be easier to understand as soon as there is a demo online, i think. A good demo is better than a huge explanation : |
yes..i do think so!! |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|