Class WsModelForm
WsModelForm generates HTML form for working with WsModel records.
- WsForm
-
WsModelForm
Param:
WsModel $model WsModel instance
Param:
Located at WsModelForm.class.php
Param:
string $dialog HTML ID of element which holds form
Example usage:
// add a new record to model $m = new MyModel(); $form = new WsModelForm($m, 'form-name'); // change label for field $form->fieldLabels['name'] = 'First Name'; // change text of submit button $form->submitButtonText = "Save Me"; // show form $form->show() // edit existing record $m->getOne(1); $form2 = new WsModelForm($m, 'form-name'); $form2->show();
Located at WsModelForm.class.php
public
|
|
public
|
|
public
|
|
public
|
appendHTML(),
booleanInput(),
hiddenInput(),
selectInput(),
textInput(),
textareaInput()
|
public
array
|
$fieldLabels
$fieldLabels Form field labels |
$_form,
$submitButtonText
|