Передаем аргументы в форму drupal7

drupal_get_form('mymodule_form',$arg_first,$arg_second);

  1. function mymodule_form($form,&$form_state,$arg_first,$arg_second){
  2.  
  3. $form['mymodule_xxx'] = array(
  4. '#title' => $arg_first,
  5. '#type' => 'checkboxes',
  6. '#options' => array_keys($arg_second),
  7. '#attributes' => array('class' => array('ctools-auto-submit')),
  8.  
  9. );
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