I have a channel where I would like admin to be able to create entries and then anonymous users would be able to add rows to a grid field. I do not want the users to be able to see existing rows(if they exist), just add.
I thought I would be able to get the total rows, and with the Simple Math plugin, make Channel Form ready to add a new row.
<input class="input-block-level" type="text" name="field_id_44[rows][new_row_{exp:simple_math calculate="{shipping_quotes:total_rows} + 1" decimal_places="0"}][col_id_6]" value="">
Which actually works as expected
<input class="input-block-level" type="text" name="field_id_44[rows][new_row_2][col_id_6]" value=""
So [new_row_2] outputs as "2" because in this case there is already an existing row. This works no matter how many rows I add. If the entry has 3 rows in this grid field, it outputs [new_row_4]... as expected.
But this unfortunately doesn't translate when submitting the form. Submitting just replaces the existing row(#1), so I think I am misunderstanding how to add new rows via Channel Form.
So long story short, how do I add rows to a grid field via channel form.