Customising Drupal forms is easy thanks to hook_form_alter(), unless you're working with form elements generated by Drupal 7's Field API. It's common to do customisations, add jQuery UI behaviours, or even advanced form item manipulation using a form alter hook, and Drupal makes it easy by giving your custom code access to the full form array and form state via the form alter hooks, but when you're dealing with Field API generated form fields, you will find it's not quite enough. The problem is that at the time the form alter hook is executed, the field API items in the form haven't been fully built yet. The solution to this is straight forward, and involves the use of a callback function that is called once the form build process is complete. Read on for full details and example code...