Jump to:

2012 Posts in 1438 Topics by 621 members

Form Questions

SilverStripe Forums » Form Questions » Passing DO Id to form action

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 403 Views
  • skorp
    Community Member
    6 Posts

    Passing DO Id to form action Link to this post

    i have this codes:

    my edit url is = site.com/market/edit/1
    when i click save i should get the id in edit_save method but dont know how.

    i tryed also writing the ID into an hiddenfield but its also not working.

    public function getFrontEndFields(){
       $fields = $this->scaffoldFormFields(array(
          'restrictFields' => array(
       return $fields;

    public function getCMSFields()
    $fields = parent::getCMSFields();
       $fields->addFieldToTab('Root.Main', new HiddenField('ID','','editid'));
    $fields->addFieldToTab("Root.Main", new TextField('Name'));
    $fields->addFieldToTab("Root.Main", new TextareaField('Description'));
    // $fields->removeFieldFromTab('Root.Main', 'MarketPageID');

    return $fields;

    anyone any idea how to to this?

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.