CakePHP ommiting to send an input field and changing input value onSubmit?
===

I am on CakePHP 1.2 at the office and, following [my last question][1], I would like to send the array key of the selected option in a `SELECT` input instead of sending its actual value. I have tried a few things with the `Model::beforeSave()` function, without success.

I am aware that the data posted by CakePHP does not include the whole array, but only the selected value.
Here is what the function looks like at the moment:

    function beforeSave(){
		$this->Post->set('category_id', = array_keys($this->data['Annonce']['category_id']);
		# debug($this->data);
	}

Would there be a way to store the array keys into an hidden input and changing this input value depending on the user's selected item in the `SELECT` input, and to also ommit sending the user's input but still send the hidden value?

Thank you everyone for taking some of your time in ready my question and have a nice day!

  [1]: http://stackoverflow.com/questions/11692728/cakephp-select-input-is-setting-a-display-member-and-a-value-member-possible/11692848