RE: [PEAR] Quickform - clientside disabling of form elements

From: Date: Tue, 27 May 2003 12:33:53 +0000
Subject: RE: [PEAR] Quickform - clientside disabling of form elements
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5615@lists.php.net to get a copy of this message
>That's javascript. Just add a javascript disabler function into your template or as a >static element. If the function is called 'disableDate()', then add an 'onclick' => >'disableDate()' attribute to your radio element: >$radio =& HTML_QuickForm::createElement('radio', 'current', null, array('onclick' => >'disableDate();')); >In disableDate(), you need to check if the radio is checked or not and accordingly >disable the date element. Elements in forms have properties that can be accessed with >javascript, check them out to see which one you have to change. I am not sure onclick >is the right event to call though. Hi there I'd kind of got to that point already - I'm having trouble because the select boxes for the dates are an array of values in Javascript - I can't seem to get at the array of values to say: document.entryForm.dateStopped.d.disabled = true This has no effect on the form at all. I know this is seeming to ask about JavaScript and not php but anybody done this? I can't seem to do it because I don't know how quickform was designed to work with JavaScript. Yours hopefully Steve --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.476 / Virus Database: 273 - Release Date: 24/04/2003 ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________

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