update form text_field on collection_select selection

I have form and a collection_select control. I would like to update form fields (text box) when I select an item from the collection_select box.

It's like selecting template from the collection_select and the template automatically loads to text boxes.

Any help?

You will either have to use javascript or ajax for this. If you don't know about them then start with google.