Jump to:

10845 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Multi Step Form: Not progressing to next step

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 149 Views
  • Bimble
    Avatar
    Community Member
    16 Posts

    Multi Step Form: Not progressing to next step Link to this post

    Im trying to create a multi step form. The first step works fine, but after pressing next, I get a no content underneath the title.

    Anyone familiar with this module can see any code errors?

    <?php

    class CSVWizard extends Page {
    }

    class CSVWizard_Controller extends Page_Controller {
    private static $allowed_actions = array('index', 'CSVWizard');
    public function index(SS_HTTPRequest $request) {
    $this->Content = $this->CSVWizardForm();
    return $this->render();
    }
    public function CSVWizardForm() {
    return new CSVWizardMultiForm($this, 'CSVWizard');
    }
    function finished() {
    return array(
    'Title' => 'Thank you for your submission',
    'Content' => "<p>You have successfully submitted the form!</p>"
    );
    }
    }

    class CSVWizardMultiForm extends MultiForm {
    public static $start_step = 'CSVSelectFile';
    }

    class CSVSelectFile extends MultiFormStep {
    public static $next_steps = 'CSVSelectSchema';
    function getFields() {
    return new FieldList(
    new TextField('directory', 'Directory'),
    new TextField('filePattern', 'File Pattern')
    );
    }
    }

    class CSVSelectSchema extends MultiFormStep {
    public static $next_steps = 'CSVUpdateTask';
    function getFields() {
    return new FieldList(
    new TextField('style', 'Style'),
    new TextField('header', 'Header')
    );
    }
    }

    class CSVUpdateTask extends MultiFormStep {
    public static $is_final_step = true;
    }

    149 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.