block view.php form action

hi there

i'm currently building a small block with a form. in the view.php i've added
<?php echo $this->action('submit_form') ?>
to the method value of the form tag and in the controller is also
function action_submit_form()

unfortunately the method="" still keeps blank. what else do i have to do, to get the form working with my block controller?

thanks in advance

View Replies:
Steff replied on at Permalink Reply
i found someting. i have some functions in my controller to get some values back.
function getFormWidth(){
   return $this->formWidth;

i need this functions, to get the values back, if the block is added to the template.
it seams, that this functions touches something else which makes action_submit_form unavailable.

does any body know an other way, to get this problem solved? i really need the values, which are passed through the template to the controller.

so, any idea?
nerdess replied on at Permalink Reply
hm, my action remains empty too if I add a block directly in a page template like so (because i want the same block to appear on multiple pages):

$form = BlockType::getByHandle('fancy_form');

However, if I add the same block the "normal" way as in "edit this page"->"add block"->"Fancy form" then the action looks nice like so


could it be because the first approach is not properly adding the block?
zanedev replied on at Permalink Reply
Yep it's definitely happening where
$this->action doesnt work in a block when called from code. I've searched all over the forums and it look like a common problem with no real solution yet. what a pain!
nicolaikr replied on at Permalink Reply
I can confirm that this is still an issue.
I've reported it on the bug-tracker