Re: [webmin-devel] Problem with text box values

"Jamie Cameron" <[email protected]> Fri, 20 May 2011 14:11:08 -0700 (PDT)
Newsgroups gmane.comp.web.webmin.devel
Message-ID <[email protected]>
On 20/May/2011 12:19 IsaĆ­as Sancho <[email protected]> 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 [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel