I have a form with a table that displays a number of rows (each row contains user info). On form submit I edit all the users that are displayed in the table. Above the table I render a ctools link "Add user". This opens a modal dialog containing a form. After form submit I'm adding a row to the user table with this code:
$output = ajax_command_after('.managers-table tr:last', '<tr>my data</tr>');
This works fine, if I look into my DOM, the table contains that row. But here is the tricky part, how do I rebuild my "table-form"? Because when I submit my form, drupal doesn't know a row is added to the table, he just ignores the added row... How can I solve this issue?