Fwd: Re: [dev] (no subject)

Chuck Hagenbuch chuck at horde.org
Thu Feb 27 15:20:52 PST 2003


Please keep threads on the list....

----- Forwarded message from marioy at upb.edu.co -----
    Date: Thu, 27 Feb 2003 19:47:36 -0500
    From: marioy at upb.edu.co
Reply-To: marioy at upb.edu.co
 Subject: Re: [dev] (no subject)
      To: Chuck Hagenbuch <chuck at horde.org>

Mensaje citado por Chuck Hagenbuch <chuck at horde.org>: 
 
> Quoting marioy at upb.edu.co: 
>  
> > - How can I fill a form with default values and in some way be able to 
> > identify that the user hasnt submited the form? The problem arises when I 
> > fill the $vars object with data and then  execute $form->validate() (it  
> > always return true because of the default values). The use of tokens hasnt 
>  
> > been any help because the form has to be submited various times in a short 
>  
> > period of time by the same person. 
>  
> But every time you regenerate the form (in the code), they get a fresh 
> token. You can also check for 'formname' in $vars (or in $_GET and $_POST, 
> if you like). 
>  
 
Then I must be doing something wrong because everytime that I revisit the page 
the form gives the message - this form has allready been submited - . Do I 
need to call a function to generate a new token.? 
 
> > - How can I add javascript to the input fields, specially in the onchange 
> > and onblur options. 
>  
> This is what Horde_Form_Action:: is for, but there aren't many developed 
> yet. If you put in specific feature requests, I'll see what I can do. 
>  
Well, the actions depends on the user sometimes is an alert if the value of a 
text field is less that zero (this should be called by an onblur event), and 
sometimes is a confirm dialog on a checkbox (once is checked). So I think that 
I need a way to put custom javascript on a form field in a dinamic way.  
 
Anyway, now that I know where to look for, Ill try to construct a generic 
framework and maybe send a patch if I come up with something useful. 
 
Regards 
Mario 

-------------------------------------------------
Correo enviado por el servicio de correo Web
de la UPB http://www.upb.edu.co



----- End forwarded message -----


-chuck

--
Charles Hagenbuch, <chuck at horde.org>
must ... find ... acorns ... *thud*


More information about the dev mailing list