From this answer : How to work with the new channel forms and the new grid fieldtype ( and updateing it)
Is using the {field:field_name} variable not to your requirements? I tested this and it works a treat. Otherwsie if you want to insert manually you can do it but you'll need a little php to get the right col and row indexes...
To do it manually, or without revealing the grid I've an example below, you will need to add the existing values within hidden fields, as without them the existing data is wiped.
<?php
//first we need the column ID's for the grid. In my example these happen to be 3 and 4, you can get these id's from the exp_grid_columns table in the DB, I hard code them here as I know then but for portability you could write a query to get these
$col1 = 3;
$col2 = 4;
//next we need to know what the new row index is, we also need the existing values so I'll do a little query here to get it all...
// my grid field ID is 5, label is 'children', this entry ID is 11
$res = ee()->db->where('entry_id', '11')
->order_by('row_order', 'ASC')
->get('channel_grid_field_5');
//so lets count and display our results if any, for the input names, first its the grid field label (children) then rows, then the row ID and then col ID
$new_row = 1;
if ( $res->num_rows() > 0 ) {
//remember next row (starts at 1 not 0)
$new_row = $res->num_rows() + 1;
//echo out the hidden fields
foreach ( $res->result_array() as $row ) {
//First Column
//create the input name separate for readability!
$inputName = 'children[rows]';
$inputName .= '[row_id_' . $row['row_id'] . ']';
$inputName .= '[col_id_' . $col1 . ']';
echo '<input type="hidden" name="' . $inputName . '" value="' . $row['col_id_' . $col1] . '" />';
//Second Column
$inputName = 'children[rows]';
$inputName .= '[row_id_' . $row['row_id'] . ']';
$inputName .= '[col_id_' . $col2 . ']';
echo '<input type="hidden" name="' . $inputName . '" value="' . $row['col_id_' . $col2] . '" />';
}
}
//lastly, lets output text boxes for the new row
//First Column
echo '<input type="text" name="children[rows][new_row_' . $new_row . '][col_id_' . $col1 . ']" value="" dir="ltr" field_content_type="all" maxlength="256" />';
//Second Column
echo '<input type="text" name="children[rows][new_row_' . $new_row . '][col_id_' . $col2 . ']" value="" dir="ltr" field_content_type="all" maxlength="256" />';
?>
There you go!, this works well on my sandbox EE install, in my test I had 2 rows populated in CP, so I ended up with 4 hidden fields, and 2 new value text boxes each with new_row_3
in the name. Worked fine to append new rows to the grid.
Please note, my test was using the nice basic Text Input fields, other fiedl types might require different fashioning of their input names, and if one of the fields is a relationship field you're right in it! this wiuld constitute another question though, the example above shows how to add grid rows, without displaying the existing rows (if you want the entire matrix as it is in CP then see the answer linked at the beginning of this post).
Let us know how you get on!
PS> Sorry for the late reply, its been hectic here!