Re: [QFC] applyDefaults and its behaviour ?

From: Date: Fri, 20 Jan 2006 16:01:38 +0000
Subject: Re: [QFC] applyDefaults and its behaviour ?
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-41015@lists.php.net to get a copy of this message
Justin Patrin a écrit :
Defaults are defaults. They are the lowest level in the chain. Constants and submitted values override them. If you need to override submited values you have to do something special, such as setConstants when displaying the form (as long as you don't use setConstants when processing it should be fine). Or, probably a better solution, simply rewrite the values stored in QFC's data store. -- Justin Patrin As you said it yourself, defaults are defaults.
But if you consider standard reset button of html form, you can retrieve the old values (defaults) before to submit a form. Easy if you made a mistake and want to rollback. I'm expected a such behaviour for my RESET button: Your idea of rewrite values stored in QFC data store is a solution, but its a private solution. Perharps we could think of a general solution that can be share and reuse in any situation ? Laurent

« previous php.pear.dev (#41015) next »