Problems to integrate a form into a block So far, the form is rendered in the block, but the following errors are displayed:


  Notice: Undefined index: ios_lang_checkbox_nameform_function in
  drupal_retrieve_form()
  
  Warning: call_user_func_array() expects parameter 1 to be a valid
  callback, function 'ios_lang_checkbox_nameform_function' not found or
  invalid function name in drupal_retrieve_form()


&lt;?php

function ios_lang_checkbox_block_info() {
  return array(
    'ios_lang_checkbox' =&gt; array(
      'info' =&gt; t('Ios Like language switcher'),
      'description' =&gt; t('Ios Like language switcher')
    )
  );
}
function ios_lang_checkbox_block_view($delta='')
{
    $block['content'] = drupal_get_form('ios_lang_checkbox_nameform');

  switch($delta) {
    case 'ios_lang_checkbox':
      $block['subject'] = null; // Most forms don't have a subject 
      $block['content'] = drupal_get_form('ios_lang_checkbox_nameform_function');
      break;
   }
   return $block;
 }

function ios_lang_checkbox_menu() {
    $items['ios_lang_checkbox'] = array(
        'title' =&gt; 'View the sample form',
        'page callback' =&gt; 'drupal_get_form',
        'page arguments' =&gt; array('ios_lang_checkbox_nameform'),
        'access callback' =&gt; TRUE,
        'type' =&gt; MENU_NORMAL_ITEM
    );
    return $items;
}


/**
 * Define a form.
 */
function ios_lang_checkbox_nameform($form, &amp;$form_state) {

    $options = array(
        'de' =&gt; t('de'),
        );
    $form['ios'] = array(
        '#title' =&gt; t('Your Name'),
        '#type' =&gt; 'checkboxes',
        '#description' =&gt; t('Choose language'),
        '#options' =&gt; $options,
    );
    $form['submit'] = array(
        '#type' =&gt; 'submit',
        '#value' =&gt; t('Submit')
    );
    return $form;
}


?&gt; 


Thanks a lot!
You've got _function on the end of ios_lang_checkbox_nameform_function...just change that line to:

$block['content'] = drupal_get_form('ios_lang_checkbox_nameform');. 


The string passed to drupal_get_form() needs to be exactly the same as the function name itself, no need to put _function on the end :)