Jump to:

23487 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » SS3 - Ajax - Form - Session timed out

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 769 Views
  • Lukin
    Community Member
    42 Posts

    SS3 - Ajax - Form - Session timed out Link to this post


    I try to load a form from my pagecontroller via an ajaxrequest.

    As an answer I get the error message : "Sorry, your session has timed out."

    My code:

       public static $allowed_actions = array (
       public function UploadForm(){
          $thumbField = new UploadField('ProfilePicture', 'Profile picture');
        $thumbField->getValidator()->setAllowedExtensions(array('jpg', 'jpeg', 'png', 'gif'));
        $thumbField->setConfig('allowedMaxFileNumber', 10);
          $form = new Form (
             new FieldList (
             new FieldList (
                new FormAction('doApply', _t('Angebot.APPLYNOW','Angebot senden'))

          return $form;      

    Don't know what to do.
    An help appreciated ;)

    Thx in advnace

  • Sean
    Forum Moderator
    921 Posts

    Re: SS3 - Ajax - Form - Session timed out Link to this post

    Hi there,

    You need to ensure the SecurityID hidden field in the form is also passed when submitting the form via AJAX.


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.