This project is read-only.

Best approach to add static (html) text above custom form

Topics: Customizing Orchard
Oct 11, 2012 at 2:51 PM

Hi all,

I have a custom form that works fine. I now would like to add some lines of 'static' html text above the form. What I did so far:
- Created a new 'Contact Form' content type with some fields
- Created a new custom form based on the new contant type

Nice form, works great but I cannot add any extra html to the page.
What would be the best approach?

Oct 11, 2012 at 4:34 PM

A template alternate for that content type should do the trick.

Oct 11, 2012 at 8:11 PM

Ok, that does the trick for now.

Next step would be to make the fixed html to be editable by CMS. Now it's hard coded in the template file.
But that's something for later. One step at the time. Still learning, but this CSM feels better than Sitecore.

Oct 11, 2012 at 8:13 PM

A widget maybe?

Oct 12, 2012 at 7:54 AM
Edited Oct 12, 2012 at 7:55 AM

Can I access the widget directly from my new template alternate or should I take a completely different approach?

  • Ditch the template alternate
  • Create a new layer for my custom form pages
  • Add widget(s) to it

Just trying to get my head around it...

Oct 12, 2012 at 5:49 PM

Access it to do what?

Yes, I'm suggesting you create a layer for your custom form and add html widgets to it.