So i have this field i want to keep hidden in my form.
For this purpose i have tried the following:
<?php echo $this->Form->input('group_id', array('hiddenField' => true, 'value'=> 2)); ?>
<?php echo $this->Form->input('group_id', array('options' => array('hiddenField'=> 'true'), 'value'=>2 )); ?>
You misread the documentation, I assume.
hiddenField is to enable/disable specific hidden fields for specific form fields.
You are either looking for
$this->Form->input('group_id', array('type' => 'hidden');
I usually only use the latter.
BUT - that said - you shouldnt actually use either one of those. And omit any fields that serve no real purpose for the view and its form. Instead you should inject those fields into the data array prior to saving. See http://www.dereuromark.de/2010/06/23/working-with-forms/