Form fields

Form fields can be used in cells and sections. The supported form fields in PHPRtfLite are

  • Checkboxes
  • Dropdown boxes and
  • Text fields

Checkbox

Checkbox example:

<?php
$checkbox = $cell->addCheckbox();
// checkbox is checked
$checkbox->setChecked();
$cell->writeText('checkbox label');

Text field

Text field example:

<?php
$cell->writeText('text field label');
$textField = $cell->addTextField();
// set text field text
$textField->setDefaultValue('Lorem ipsum');

Table Of Contents

Previous topic

Footnotes / Endnotes

Next topic

Bugs and feature requests

This Page