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

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

Closing the Form

The FormHelper also includes an end() method that completes the form markup. Often, end() only outputs a closing form tag, but using end() also allows the FormHelper to insert needed hidden form elements other methods may be depending on.

Простой текст
  1. <?php echo $form->create(); ?>
  2. <!-- Form elements go here -->
  3. <?php echo $form->end(); ?>

If a string is supplied as the first parameter to end(), the FormHelper outputs a submit button named accordingly along with the closing form tag.

Простой текст
  1. <?php echo $form->end('Finish'); ?>
  2. Output:
  3. <div class="submit">
  4. <input type="submit" value="Finish" />
  5. </div>
  6. </form>