Изменяем форму даты

Для изменения этого типа формы подойдет такой путь

  1. hook_date_text_process_alter()
  2. hook_date_popup_process_alter()
  3. hook_date_combo_process_alter()
  4. hook_date_select_process_alter()
  5.  
  6.  
  7.  
  8. /**
  9.  * Implements hook_date_text_process_alter().
  10.  */
  11. function MYMODULE_date_text_process_alter(&$element, &$form_state, $context) {
  12. if ($form_state['complete form']['#form_id'] == 'views_exposed_form') {
  13. //dpm($form_state);
  14. if ($element['#id'] == 'edit-field-appintment-date-value-value') {
  15. $element['date']['#attributes']['placeholder'] = t('Demo placeholder)';
  16. //dpm($element);
  17. }
  18. }
  19. }
Russian
Категория: 
The code has been tested and works
Мультитег: 

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Target Image