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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

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


Go to End


4 Posts   1804 Views

Avatar
Piklets

Community Member, 36 Posts

18 October 2008 at 1:59pm

Edited: 18/10/2008 5:13pm

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

Community Member, 36 Posts

18 October 2008 at 4:00pm

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

Community Member, 36 Posts

18 October 2008 at 5:13pm

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

Forum Moderator, 628 Posts

18 October 2008 at 7:30pm

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 :)