} $pass->addValidationCallback('notEqualsName'); $pass->addJsValidationCallback('notEqualsName'); $jaofnee = $f->createInputField('radiobutton', 'jaofnee', false, 'Ja of Nee'); $jaofnee->addItem('ja', 'Ja'); $jaofnee->addItem('nee', 'Nee'); $watdanwel = $f->createInputField('text', 'watdanwel', false, 'Wat dan wel?'); $f->addPreValidationHook('watdanwel_bla'); $jaofnee->setAttribute('onClick', 'watdanwel_bla();'); function watdanwel_bla($f) { $f->getField('watdanwel')->setRequired($f->getField('jaofnee')->getValue() == 'nee'); } $favbier = new DingesStatic('favbier', 'Favoriete bier'); $favbier->setDefaultValue('Hertog Jan'); $f->addField($favbier); $klikjerot = $f->createInputField('checklist', 'klikjerot', false, 'Klik je rot'); foreach (range('a', 'f') as $i) { $klikjerot->addItem($i, strtoupper($i)); } $fileup = $f->createInputField('file', 'fileup', false, 'Pr0n'); $fileup->setMaxFileSize(1024 * 1024); $subm = new DingesSubmit('subm', 'Opst"uren'); $f->addField($subm); $subimg = new DingesSubmitImage('subimg', 'opslaan.png'); $f->addField($subimg); $what = new DingesMultipleSubmit('what'); $what->addItem('bier', 'Ik wil bier'); $what->addItem('wodka', 'Ik wil wodka'); $f->addField($what); $hide = new DingesHidden('hide');