Save values after add more ajax in form api - field name issue
I was having problems with the fieldset, since it was set to #tree. The submit handler should look like this:

function main_form_form_submit($form, &amp;$form_state) {
  $film_id = db_insert('film_main')
  -&gt;fields(array(
     'film_title' =&gt; $form_state['values']['film_title'],
     'film_title_1' =&gt; $form_state['values']['add_title'][1]['main_film_tab']['film_title_1'],
     'film_title_2' =&gt; $form_state['values']['add_title'][2]['main_film_tab']['film_title_2'],
     ))
 -&gt;execute();