Webylon 3.2 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
  • Download
Version: current
  • 3.2
  • 3.1

Packages

  • 1c
    • exchange
      • catalog
  • auth
  • Booking
  • building
    • company
  • cart
    • shipping
    • steppedcheckout
  • Catalog
    • monument
  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • newsletter
    • publishers
    • reports
    • security
    • tasks
  • Dashboard
  • DataObjectManager
  • event
  • faq
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • googlesitemaps
  • guestbook
  • installer
  • newsletter
  • None
  • photo
    • gallery
  • PHP
  • polls
  • recaptcha
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets
  • seo
    • open
      • graph
  • sfDateTimePlugin
  • spamprotection
  • stealth
    • captha
  • subsites
  • userform
    • pagetypes
  • userforms
  • webylon
  • widgets

Classes

  • DatetimeField
  • FormScaffolder
  • MyRangeField
  • NestedForm
  • RangeField
 1 <?php
 2 /**
 3  * This is a form decorator that lets you place a form inside another form.
 4  * The actions will be appropriately rewritten so that the nested form gets called, rather than the parent form.
 5  * 
 6  * @package sapphire
 7  * @subpackage forms
 8  */
 9 class NestedForm extends ViewableData {
10     protected $form;
11 
12     /**
13      * Represent the given form in a tabular style
14      * @param form The form to decorate.
15      */
16     function __construct(Form $form) {
17         $this->form = $form;
18         $this->failover = $form;
19         parent::__construct();
20     }
21     
22     function Actions() {
23         $actions = $this->form->Actions();
24         foreach($actions as $action) {
25             $action->setFullAction('action_' . $action->actionName() 
26                 .'?formController=' . str_replace(array('?','.'), array('&','%2e'), $this->form->FormAction()) );
27         }
28         return $actions;
29     }
30 }
[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. -
Webylon 3.2 API Docs API documentation generated by ApiGen 2.8.0