webCOMAND

form::submit()

Return HTML code to represent a form submit button.

Prototype

string submit(array $options = [])

Parameters

  • options - Optional key/value pairs:
    • attributes - An associative array of <input> attributes to override and/or add to the defaults.  If an attribute value is set to NULL, the attribute will be added without a value.

Return

HTML code for the submit button.

<input type="submit" value="<attributes value>" />

Example

$repo = comand::repo();
$contact = $repo->new_object('Contact');
$form = new \io_comand_web\form($contact);
echo($form->submit(['attributes'=>['value'=>'Approve']]));

Related

form()