Пример #1
0
<?php

$oForm = new weeForm('myform');
echo $oForm->toString();
Пример #2
0
<?php

// Initialization
if (!defined('FORM_PATH')) {
    define('FORM_PATH', dirname(__FILE__) . '/form/');
}
// Test
$oForm = new weeForm('mini');
$oForm->fillErrors(array('textbox' => 'Bad'));
$oForm->fillErrors(array('textbox' => 'Good'));
$this->isMatching('/Good/', $oForm->toString(), _WT("The value given to textbox isn't in the generated form."));
Пример #3
0
<?php

// Initialization
if (!defined('FORM_PATH')) {
    define('FORM_PATH', dirname(__FILE__) . '/form/');
}
// Test
$oForm = new weeForm('mini');
$oForm->setUserStylesheetsPath(dirname(__FILE__) . '/xslt/');
$this->isMatching('/Test/', $oForm->toString(), _WT("The user stylesheet for submitbutton isn't loaded properly."));