Свежайшие Пирожки от CakePHP по-русски

Полнейшее руководство CakePHP 1.2 на русском языке, горячие новости и полезные статьи

Form Element-Specific Methods

The rest of the methods available in the FormHelper are for creating specific form elements. Many of these methods also make use of a special $options parameter. In this case, however, $options is used primarily to specify HTML tag attributes (such as the value or DOM id of an element in the form).

Простой текст
  1. <?php echo $form->text('username', array('class' => 'users')); ?>
  2. Output:
  3. <input name="data[User][username]" type="text" class="users" id="UserUsername" />