Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

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

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

Solved: How do I place a custom form template into one of my pages?


Reply

4 Posts   1395 Views

Avatar
Piklets

18 October 2008 at 1:59pm (Last edited: 18 October 2008 5:13pm), Community Member, 36 Posts

I have followed the steps on "Using a custom template" (http://doc.silverstripe.com/doku.php?id=form), but I don't know how to add the form to one of my pages.

I have tried placing $PatientForm in, [I had 'class PatientForm extends Form'] and <% include PatientForm %> but they didn't work.

You can view my code here:
http://pastebin.com/mb04aef1

Thanks,
David

Avatar
Piklets

18 October 2008 at 4:00pm Community Member, 36 Posts

I saw this on http://doc.silverstripe.com/doku.php?id=form:

Using a custom template
Required Silverstripe 2.3 for some displayed functionality

And under http://doc.silverstripe.com/doku.php?id=upgrading, "Issues" I saw:
Trunk
then
2.3.0

Has 2.3.0 been released? It's not in the download section or in the SVN as far as I can see...

Avatar
Piklets

18 October 2008 at 5:13pm Community Member, 36 Posts

Figured it out lol, it actually makes sense!

I didn't add this to my php page controller
function Form() {
return new CustomForm($this, "Form");
}

Avatar
Sigurd

18 October 2008 at 7:30pm Forum Moderator, 628 Posts

2.3 is very close, and will simply be what is currently in trunk with some more work :)

Look at http://open.silverstripe.com/timeline to see the work happening on the soon-coming v2.3 :)