RE: [PEAR] QFC: Client-validation but not on all buttons?

From: Date: Wed, 17 Dec 2003 16:56:30 +0000
Subject: RE: [PEAR] QFC: Client-validation but not on all buttons?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9622@lists.php.net to get a copy of this message
> -----Original Message----- > From: Daniel Kopp [mailto:pear@daniu.de] > > Hi! > > Yes - sorry - I forgot to put the QFC flag on my subject ... > (and I also > _all the time_ forget to use answer all instead of answer) > > Bertrand's way with JavaScript sounds nice ... but pushes me > back to "how > can I call a certain form without using > "?_qf_formname_display=true". Or how > do you handle that? I always have this problem - starting > from the moment I > load my frameset (because I use QFC to show lots of forms > simultaneously > which actually works fine) > > So - do I need a form loader script (consisting of a simple > form that loads > the real form) or is there another way? > > As Bertrand asks for an example (quite hard to cut it down to be > understandable): > > I have a form which shows an address (from a DB). In there > are Buttons: > <new> > <previous> > <next> > <delete> > > In all Actions besides <delete> the first thing I do is save > the values to > the DB. So I need validation for all the actions besides for > <delete>. If > the data is incorrect but the user wants to delete it anyway > - it's fine but > not in any other case. But for delete I still want to call > the controller I think, in the 'delete' submit buttons definition you need to add an onclick event to return false (posibly) to cancel the calling of the forms onsubmit="" event before posting the forms data. I did it a while back (IIRC) but can't remember off the top of my head exactly what I did in the end. I had exactly the same issue about allowing deleting a half filled out form. Regards, Mike c. ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________

« previous php.pear.general (#9622) next »