this is my code that use in hook_form_alter
function for set the placeholder attribute:
if ($form_id == 'contact_site_form') {
$form['name']['#title'] = t('name/family name');
$form['name']['#attributes']['placeholder'] = t('Enter your name');
}
why don't set the placeholder attribute for contact field?
I added this line to code and the problem was solved:
Edited code is: