Is it to possible add placeholder text for link fields? Been trying to add placeholder text for my link fields.

Using hook_form_alter to add the attributes. It works fine with text fields

$form['field_first_name']['und'][0]['value']['#attributes']['placeholder'] = t( 'Your First Name' );


But not able to get it work with link fields

$form ['field_twitter_link']['und'][0]['#attributes']['value']['placeholder'] = t( 'Your Twitter profile link' );
You could do something like this in

function formalter(){
$form['#after_build'][] = 'mytheme_after_build'; 
}
function mytheme_after_build(&amp;$form, &amp;$form_state){
    $form['field_twitter_link']['und'][0]['url']['#attributes']['placeholder']=t('my new');
    return $form;
}


Taken from here https://drupal.org/node/1002560