How to add more fields after submission? I was wondering how to add more fields to a form after submitting that form.
So the form should have these fields for example:


Name (textfield)
City (select list)
Find (button)


and then when user performs the submission, the result page should look like this:


Name (textfield)
City (select list)
Gender (radio buttons) &lt;-- so they can refine the search by gender
Find (button)


How do I achieve that?
You need to add a submit handler to the button that updates some specific variable in $form_state so you can determine the "step" of the form. 
Plus, a $form_state['rebuild'] = TRUE; to rebuild the form. 

Assuming you are using Drupal 7, a hook_menu or hook_block_view (or any other function) is calling drupal_get_form function with "my_form" as argument. 

function my_form(&amp;$form, &amp;$form_state) {
  $form['name'] = array(
    '#type' =&gt; 'textfield', 
    '#title' =&gt; t('Name'),
  );
  $form['city'] = array(
    '#type' =&gt; 'select', 
    '#title' =&gt; t('City'),
    '#options' =&gt; array(
      1 =&gt; t('Kandy'), 2 =&gt; t('Anuradhapura'),
    ),
  );
  if (isset($form_state['next_step']) &amp;&amp; $form_state['next_step']) {
    $form['gender'] = array(
      '#type' =&gt; 'select',
      '#title' =&gt; t('Gender'),
      '#options' =&gt; array(
        'm' =&gt; t('Male'), 'f' =&gt; t('Female'),
      ),
    );
  }
  $form['submit'] = array(
    '#type' =&gt; 'submit', 
    '#value' =&gt; t('Find'),
  );
  return $form;
}

function my_form_submit($form, &amp;$form_state) {
  $form_state['next_step'] = TRUE; // You can also change this to FALSE in validate function to prevent the gender from appearing. 
  $form_state['rebuild'] = TRUE; // Don't forget this!

  // Do other stuff here.
}


Note how I conditionally added the gender form element, and how the submit handler sets that value. 

When the form is loaded for the first time (with empty $form_state), the condition to add the gender element will be FALSE, so no element added. 
Then, the form submit handler adds the values so in the next form rebuild, element gets included. 
Tricky part is the $form_state['rebuild'] = TRUE; part. 

Good luck!