
September 23rd, 2004, 05:54 PM
|
|
|
|
Join Date: Apr 2007
Posts: 25
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
complex Quickform
I'm trying to wrap my head around Quickform. What I want to replicate is this question.
Have you had an EKG before? If so when was your last EKG.
I need to write a validation function to require the date only if you haven't choosen 'never'.
any idea on how this might be done?
php Code:
Original
- php Code |
|
|
|
<?php .... include stuff ... $last_ekg[] =& HTML_QuickForm::createElement('checkbox', 'never', null, 'never' ); $last_ekg[] =& HTML_QuickForm::createElement('date', 'date', 'Date:', array( 'language' => 'en', 'format' => 'm/d/Y', 'minYear' => date('Y')- 50, 'maxYear' => date('Y') ) ); $form->addGroup($last_ekg,'last_ekg','When was your last EKG?',' '); $form->display(); ?>
|