Version: current

     1 <?php
     2
     3 /**
     4  * Description of MediawebForm
     5  *
     6  * @author inxo
     7  */
     8 class MediawebForm extends Form {
     9
    10     /**
    11      * Return a rendered version of this form.
    12      *
    13      * This is returned when you access a form as $FormObject rather
    14      * than <% control FormObject %>
    15      */
    16     function forTemplate() {
    17         return $this->renderWith(array(
    18             $this->getTemplate(),
    19             'MediawebForm'
    20         ));
    21     }
    22
    23     /**
    24      * Return a rendered version of this form, suitable for ajax post-back.
    25      * It triggers slightly different behaviour, such as disabling the rewriting of # links
    26      */
    27     function forAjaxTemplate() {
    28         $view = new SSViewer(array(
    29                     $this->getTemplate(),
    30                     'MediawebForm'
    31                 ));
    32
    33         return $view->dontRewriteHashlinks()->process($this);
    34     }
    35
    36 }
    37

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -