Blame view

export/PHPRtfLite-1.3.1/docs/html/_sources/formfields.txt 919 Bytes
f90e19c3   Andrea Petta   plugin update
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
  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:
  
  .. code-block:: php
  
      <?php
      $checkbox = $cell->addCheckbox();
      // checkbox is checked
      $checkbox->setChecked();
      $cell->writeText('checkbox label');
  
  
  Dropdown
  =============
  
  Dropdown box example:
  
  .. code-block:: php
  
      <?php
      $cell->writeText('dropdown label');
      $dropdown = $cell->addDropdown();
      // set dropdown items
      $dropdown->setItems(array('pear', 'apple', 'pineapple'));
      // add dropdown item
      $dropdown->addItem('orange');
  
  
  Text field
  =============
  
  Text field example:
  
  .. code-block:: php
  
      <?php
      $cell->writeText('text field label');
      $textField = $cell->addTextField();
      // set text field text
      $textField->setDefaultValue('Lorem ipsum');