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' );
This article was republished from its original source.
Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.