Invalid form token. Please reload this form and submit again

Permalink
I have created a custom login from block. Whenever i am submitting the form i am getting
Invalid form token. Please reload this form and submit again error. In form i have added a hidden field with name ccm_token.
<?php echo $form->hidden('ccm_token',Core::make('helper/validation/token')->generate($token)); ?>
When i am viewing the source i am getting a value 1443606486:9c3e97d4b1ae72f1c8de75d8af31000b. But when i am submitting the form i am getting invalid token error. Please help how to solve this.

Pluto
View Replies:
Pluto replied on at Permalink Reply
Pluto
Hello everyone, I have solved this problem.
I replaced the line <?php echo $form->hidden('ccm_token',Core::make('helper/validation/token')->generate($token)); ?> with <?php Loader::helper('validation/token')->output('login_concrete'); ?> and this is working fine.