English 中文(简体)
Html阵列。 如何在某个领域提及不断变化的无线电选择
原标题:Drupal Html array. How to reference a changing radio selection within a fieldset

我不能把这颗Dorupal html阵列在改变无线电选择时烧毁可见的财产。 我已在实地工作,但不能确定这样做会有任何改变。

是否有任何人知道为什么不开枪?

function services_formation_founders($form, &$form_state) {
$form = array();
$form[ #tree ] = TRUE;

$form[ description ] = array(
 #type  =>  item ,
 #title  => t( Founders form ),
);

$form[ founder ][ add_officer ] = array(
 #type  =>  fieldset ,
 #title  => t( Add Founder ),
 #collapsible  => TRUE,
 #collapsed  => FALSE,
 #states  => array(
   visible  => array(TRUE,
  ),
),
);

$form[ founder ][ add_officer ][ founder_type ] = array(
 #type  =>  radios ,
 #options  => array(
   individual    => t( Individual ),
   corporate  => t( Corporation ),
 ),
   #default_value => individual ,
 #title  => t( What type of Founder? )
);

if (empty($form_state[ num_names ])) {
$form_state[ num_names ] = 1;
}

  $form[ founder ][ add_officer ][ individual ] = array(
 #type  =>  textfield ,
 #title  => t( Individual ),
 #states  => array(
   visible  => array(
     :input[name="founder_type"  => array( value  => "individual"),
  ),
),
);

$form[ founder ][ add_officer ][ corporation ] = array(
 #type  =>  textfield ,
 #title  => t( Corporation ),
 #states  => array(
   visible  => array(
    :input[name="founder_type"  => array( value  => "corporate"),
  ),
 ),
);
return $form;
}
问题回答

第2行

$form = array();




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签