Silverstripe Multi Step Form Viewable Data Issues

Need some help with your multi step form. Have the multi forms working fine. That part is great.

What I’m trying to do is customise the form template for each step so that I can add some code around the input boxes (radio field mostly).

So I have template and copied the form template into this. That part works.

But I am trying to display a public function from PageController.php to pull in additional data to display.

This is what I’ve tried in pagecontroller:

(just for testing)

public function iwantmyajax()


        return $this->customise(new ArrayData([

            'Name' =>'John',

            'Role' => 'Head Coach'



When I add this code to BookingStepForm

<% with $iwantmyajax %>


<% end_with %>

It just outputs the function name iwantmyajax and ignores the variables.

Tried /dev/build and ?flush=1 to clear everything.

How would it be possible to display functions / variables outside of the MultiStepForm class?

Any help would be appreciated :slight_smile: