Thanx for the quick answer. The ui_submit was exactly what I was looking for. I'm still new with webmin and web developement and some things escape my vision sometimes.

Thanx.


Isaías Sancho
Director de proyectos

isaias.sancho@clearcorp.co.cr
+506 2253-8140
+506 8383-2588



2011/5/20 Jamie Cameron <jcameron@webmin.com>
On 20/May/2011 12:19 Isaías Sancho <isaias.sancho@clearcorp.co.cr> wrote ..
> Hello,
>
> I'm working with webmin to make a web interface to my own program. The
> problem I have is that I'm creating a text box where I show a certain value
> my program manages. Then the user should modify this value, that's why I use
> a text box. But the user changes are validated only when a 'Modify' button
> is pressed.
>
> My question is, how do I check the values that were entered in the text
> boxes? Where does webmin saves those values?

Do you mean validation on the server side?

If so, a typical form is in a script named like edit.cgi , like :

...
print ui_form_start("save.cgi");
print "Your name: ",ui_textbox("name", "", 40);
print ui_submit("Save");
print ui_form_end();
...

and validation is done in save.cgi like :

...
ReadParse();
if ($in{'name'} eq '') {
 error("You didn't enter a name");
 }
...

 - Jamie

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
-
Forwarded by the Webmin development list at webmin-devel@webmin.com
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel