Form block with two form styles

Permalink
Is there a way to use the form block but have two different view files?

I am making one for that is a "call me back" that has to fit into a specific area and I am happy to keep the other contact form as a standard style.

I tried to duplicate the block but it screwed up as things were all over the place and I couldnt see how to change the block details in the duplicated controller?

gunkdesign
 
TheRealSean replied on at Permalink Best Answer Reply
TheRealSean
you can apply a custom template to the form block,

Click on a block -> Custom Template -> Choose Template

The Extra view would go into

root -> blocks -> forms -> templates -> your_custom_name -> view.php|view.css

That is of course if you want a different look, if you need to edit the actual form controller then you could use the community form block that is floating around that allows you to use an external controller, making that editing of the controller much easier
gunkdesign replied on at Permalink Reply
gunkdesign
great thanks, would it take on an different js for that specific template?

I am trying to impliment this example for the "callback form" :http://www.codeblog.ch/2009/07/concrete5-form-layout/...

thanks for your quick reply
jordanlev replied on at Permalink Reply
jordanlev
TheRealSean replied on at Permalink Reply
TheRealSean
I tend to have trouble including extra js files from templates, the addToHeader does not seem to work, (unless called from the controller)

I believe though you can use a view.js which is automatically included if found within your template folder.

in the same way as the view.php|view.css|view.js

I recommend Jordan's addons too he does some great work. And you may find they do what you need if not straight out of the box with a little tweaking :)