If we want to alter webform item e.g. add a colon :
to a label of a specific field, we use this:
$form['submitted']['my_form_component']['#title'] = $form['submitted']['my_form_component']['#title'] . ":";
But what if we want to apply that colon to all field labels and not just that one my_form_component
?
Current code:
function MYTHEME_form_alter( &$form, &$form_state, $form_id ){
if (strpos($form_id, 'webform_client_form_') === 0) {
$form['submitted']['my_form_component']['#title'] = $form['submitted']['my_form_component']['#title'] . ":";
}
}