การเพิ่มคำตอบของ Ayesh ฉันได้รวมกรณีการใช้ตัวอย่างสำหรับโค้ดดังกล่าว ในขณะที่คำตอบของ marvangend นั้นมีมากมายกว่า Drupalesk แต่ทว่าการขุดเพื่อผลลัพธ์ที่ง่ายมาก การรักษาองค์ประกอบเฉพาะของรูปแบบ & CSS ที่มาพร้อมกับแบบฟอร์มดังกล่าวเป็นกรณีการใช้งานทั่วไปทำให้เราสามารถกำหนดเป้าหมายและดำเนินการกับองค์ประกอบภายในได้ค่อนข้างเฉพาะเจาะจงมากขึ้น
http://legomenon.io/article/drupal-7-adding-form-placeholder-attributes
function mymodule_form_alter(&$form, $form_state, $form_id) {
  switch ($form_id) {
    // Waterfall.
    case 'webform_client_form_16':
    case 'webform_client_form_51':
    case 'webform_client_form_64':
    case 'webform_client_form_78':
      $exclude = array('select', 'radios', 'checkboxes', 'managed_file');
      foreach ($form['submitted'] as $name => $component) {
        if (!in_array($component['#type'], $exclude) && $name != '#tree') {
          $form['submitted'][$name]['#prefix'] = '<span class= "label-invisible">';
          $form['submitted'][$name]['#suffix'] = '</span>';
          $form['submitted'][$name]['#attributes']['placeholder'] = $component['#title'];
        }
      }
      $form['#attached']['css'] = array(
        drupal_get_path('module', 'mymodule') . '/css/mymodule.form.css',
      );
    break;
  }
}
               
              
.field-name-field-myfield label{ color:red; }