Изменяем значения раскрытых фильтров views

  1. function mymodule_form_alter(&$form, &$form_state, $form_id){
  2.  
  3. if($form_id == 'views_exposed_form'){
  4. $form['#validate'][] = 'mymodule_validate';
  5. }
  6. }
  7.  
  8.  
  9. function mymodule_validate($form, &$form_state)
  10. {
  11. $myval = 'yyyy';
  12. $form_state['values']['xxx'] = $myval;
  13. }
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