Good afternoon,

On 27/04/09 at 5:54 PM -0700, Greg Coates <g...@coatesoft.com> wrote:

As far as I can tell from the documentation, the only way that a row can be deleted from the model (database) when using a Repeatable is by using the 'delete_if_true' attribute along with a checkbox. There's no way to automatically update the model if rows are removed from the Repeatable using javascript.

Why not just use javascript to set the field assigned to 'delete_if_true'? Make it a hidden field and submit it with the form. And the javascript doesn't have to delete the row, just set it to display:none; and set the delete_if_true field.

That way seems easier (& safer?) than changing HTML::FF model behaviour.

It would be really great if rows could be deleted from the model if they are no 
longer present in the Repeatable.

What if second user adds a row/record while first user has page open (row doesn't exist). First user submits form, which doesn't have the newly added row so the new row gets deleted. I doubt that is intended result.

My AU$0.03.

Charlie

--
   Charlie Garrison  <garri...@zeta.org.au>
   PO Box 141, Windsor, NSW 2756, Australia

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
http://www.ietf.org/rfc/rfc1855.txt

_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to