Jump to:

10380 Posts in 2195 Topics by 1711 members

All other Modules

SilverStripe Forums » All other Modules » Userforms Submission URL

Discuss all other Modules here.

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 162 Views
  • Liam
    Avatar
    Community Member
    462 Posts

    Userforms Submission URL Link to this post

    I just want to add an anchor ID to the URL so it will reload back to the form area on the page.

    I solved this for successful submissions.

    UserDefinedForm.php line 856:
    return $this->redirect($this->Link() . 'finished' . $referrer . '#singleColumn');

    But for forms with errors (blank required fields), I can't get it working.

    line 718

    if(Session::get("FormInfo.{$form->FormName()}.errors")){
             Controller::curr()->redirectBack();
             return;
          }

    No matter what I change redirectBack(); too, nothing changes.

    162 Views
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.