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.

Form Questions /

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

How to use Include within custom form template


Go to End


2 Posts   1646 Views

Avatar
VPull

Community Member, 58 Posts

27 July 2017 at 10:23pm

Hi all,
Is it possible to use include within CustomFormTemplate.ss file?
I wanted to display some template data within <form> and </form>, and I followed the steps from How to Create Lightweight Form and put

<% include CustomBlock %>
in CustomFormTemplate.ss , but it is not working

CustomFormTemplate.ss file is in templates directory not in Include.

Avatar
carlo

Community Member, 6 Posts

4 August 2017 at 10:18am

Edited: 04/08/2017 10:19am

Hey VPull,
simply put CustomBlock.ss inside yourmoduleortheme/templates/Includes/ and make sure you flushed the cache like yourwebsite.com/?flush=all