correctly add / remove / update rows from the document preparation page