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?
oh dear. would it work if i used an iframe or
or php include?
Can i put anything from my scrapbook into the theme?
or php include?
Can i put anything from my scrapbook into the theme?
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.
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.
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.
I did think about that but when I set defaults they never seem to work amazingly well.
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 );
?>
<?php
$FooterBlock = Block::getByName('what_you_named_your_block');
$bv = new BlockView();
$bv->render($FooterBlock );
?>
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.