Autocomplete field not in post

http://www.yiiframework.com/doc/api/1.1/CJuiAutoComplete

In my autocomplete i search for users and return the user id to the hidden field.

Now, that works perfectly to set the user.

But if there’s an error in the form, after the post the hidden field will be populated, but the other field (the one the user can use to search for the user) will be empty.

The attribute (user_name) is already a public attribute of the model and set to safe.

If i print_r $_POST[‘MyRecord’] i get all attributes the user entered except user_name.

[color="#8B0000"]

[EDIT]

The problem was on my view. I disabled the field every time the user chose a user from the autocomplete field.[/color]