For a Drupal 7 site, I'm trying to alter a form into multi-step and want to change the label of a field based on some answer from the first step, which is the reason for my question.
I tried modifying $form[$field_name]['und']['#title'] but the label gets set back to default sometime after the alter function. I tried using an after_build function, but maybe I'm using it wrong because it still doesn't change.
Edit: The answer on Why is hook_form_alter() so messy? explains which label I should change.