Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » new Form $controller isn't working

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 919 Views
  • Flashingback
    Community Member
    1 Post

    new Form $controller isn't working Link to this post


    I have problems with Form class I have the following code:

    class PortfolioMember extends Page_Controller {

       function add(){
          $fields = new FieldSet(
             new SimpleImageField("project"),
             new TextField("titel","titel"),
             new TextareaField("omschrijving","omschrijving")

          $actions = new FieldSet(new FormAction("save", "save"));
          $form = new Form($this, "add", $fields, $actions);

          return array(
             "Form" => $form

    And now the problem: when I view de html it parses this:

    <form id="Form_add" action="/?executeForm=add" method="post" enctype="multipart/form-data">

    ase you can see the is the action attribute's value "/?executeForm=add". I think it should be

    What am I doing Wrong? Or is this a bug?

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.