'gerd', 'password' => 'gerd123' ); $user->login($cred); $uid = $user->getId(); $formDef = array(); $formDef['file'] = array( 'type' => 'Vfsfile', 'attributes' => array( ) ); $params = array(); $params['elements'] = $formDef; $form = WBClass::create('patForms', $params); $values = array(); $errors = array(); if (isset($_REQUEST['save']) && !empty($_REQUEST['save'])) { $form->setSubmitted(true); if (!$form->validateForm()) { $errors = $form->getValidationErrors(); foreach ($errors['file'] as $e) { echo "error: " . $e['message'] . "\n"; } } else { $values = $form->getValues(); sleep(10); echo 'Success ' . $values['file'] . "\n"; } exit(0); } ?>

Free upload slots



Upload

$def) { $el = $form->getElementByName($name); echo $name . ": "; echo $el->serialize(); } ?>