Re: formbuilder subform and clientrules validation

From: Date: Sat, 07 Jan 2006 02:38:04 +0000
Subject: Re: formbuilder subform and clientrules validation
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22469@lists.php.net to get a copy of this message
On 1/6/06, Andrew Wooldridge <andrew.r.wooldridge@vanderbilt.edu> wrote: > has anyone combined clientrules validation with optional subforms > using formbuilder? > > i'm having problems: clientrules with a subform doesn't work. here > is why.... > > when the parent form is made using getForm() method it adds the > clientside validate js function to the form tab (called > validate_dataobjects_hist_proc in pasted code below).. > problem is... you have to create the form before you can append the > subform.... > > i set clientrules to true on both my parentform and my child > subform. the appropriate javascript for subform validation gets > added to the html source for the subform validation...but the page is > never told to run the subform js function during the onsubmit > handler. (see onsubmit below) > > ---explanatory snippet--- > <form action="/CLQTS/editevent.php?type=proc" method="post" > name="dataobjects_hist_proc" id="dataobjects_hist_proc" > target="_self" onsubmit="try { var myValidator = > validate_dataobjects_hist_proc; } catch(e) { return true; } return > myValidator(this);"> > Heh, another limitation of my SubForm limitation. AFAIK no one has tried to get this working with SubForms. It's currently not supported, but it can probably be added with some mild hacking. I'll try to look into it. -- Justin Patrin

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