Change the 'Other' option

  1. function example_elements_form() {
  2.   $form = array();
  3.  
  4.   $options = array(
  5.     'one' => t('First Option'),
  6.     'two' => t('Second Option'),
  7.   );
  8.  
  9.   $form['test'] = array(
  10.     '#type' => 'comboselect',    
  11.     '#title' => t('Example'),
  12.     '#required' => TRUE,
  13.     '#default_options' => $options,
  14.     '#other' => t('None of the above, but'),
  15.   );
  16.  
  17.   $form['submit'] = array(
  18.     '#type' => 'submit',
  19.     '#value' => t('Submit'),
  20.   );
  21.  
  22.   return $form;
  23. }

No votes yet
AttachmentSize
comboselect_other_wording.JPG15.45 KB