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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Form Questions /

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

How to use Include within custom form template


Go to End


2 Posts   165 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