Form

Permalink 1 user found helpful
I'm having trouble how to find out how to put a form block into a template. Im trying to put a small contact form at the footer of each page as default, how do I do this?

MattGreyDesign
 
Remo replied on at Permalink Reply
Remo
I'd probably use an external form block. You'll need lots of properties to create the form controller using just code.

I doubt it will be easier than an external form block. I'm not even sure if it's possible to put it in a template since there's quite some stuff in the controller that pulls stuff from the database.
MattGreyDesign replied on at Permalink Reply
MattGreyDesign
oh dear. would it work if i used an iframe or
or php include?
Can i put anything from my scrapbook into the theme?
jgarcia replied on at Permalink Reply
jgarcia
I agree with Remo here. While it's great for basic forms, the core form block that comes with C5 is rather difficult to customize. I'd recommend either creating an external form as well or checking out the new form block in the marketplace.

http://www.concrete5.org/marketplace/addons/extended-form/...

I've not used it myself outside of brief testing, but it looks to be getting great reviews.
ideasponge replied on at Permalink Reply
ideasponge
why not just add a form block to the Page Type defaults? Just create a special content area in your Theme and then add the form block by going to Pages & Themes > Page Types then edit the page defaults you want the form on.
MattGreyDesign replied on at Permalink Reply
MattGreyDesign
I did think about that but when I set defaults they never seem to work amazingly well.
ThemeGoodness replied on at Permalink Reply
ThemeGoodness
Add it to your scrapbooks then call it in your template?

<?php
$FooterBlock = Block::getByName('what_you_named_your_block');
$bv = new BlockView();
$bv->render($FooterBlock );
?>