Re: qucikform

From: Date: Thu, 19 May 2005 22:04:45 +0000
Subject: Re: qucikform
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19284@lists.php.net to get a copy of this message
Javascript. Write a function that loops through your elements and sets value = "" for text inputs (text, textarea). for radio buttons and checkboxes, set the "checked" value to false. for select drop-downs set the selectedIndex to null. it's not going to be a pear function. assign that javascript function to the "onclick" event of a button. matte - matte@arubanetworks.com webmonkey » arubanetworks.com <http://www.arubanetworks.com> Get Firefox! <http://www.spreadfirefox.com/community/?q=affiliates&id=2885&t=85> | Reclaim Your Inbox! <http://www.mozilla.org/products/thunderbird> Richard U wrote:
hey guys... i have a follow up to this question... http://marc.theaimsgroup.com/?l=pear-general&m=108771498326180&w=2
I'm coded a form that under certain circumstances need to fix the values that comes from $_REQUEST, for example say: $_REQUEST["id_customer"] (that contains "345") First, I use the setDefaults method to change the value of the element, but quickForm simply don't take it in account, say: $defaults("id_customer" => "0"); $exampleFrm->setDefaults($defaults); This does not worked.
Use setConstants(). . . . . Thats fine... but on top of that also need a clear button... that will totally clear the form fields so the form can load up with values from setConstants but then should be clearable using the clear button element how can i accomplish this...


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