[html-formfu] Feature request: Repeatable delete from model behavior

Greg Coates greg at coatesoft.com
Tue Apr 28 18:01:03 GMT 2009


I hadn't thought of the concurrency issue.  Therefore, I think that your 
javascript field setting/hiding method is the way to go here.

Thanks for the insight.

Greg


Charlie Garrison wrote:
> Good afternoon,
> 
> On 27/04/09 at 5:54 PM -0700, Greg Coates <greg at 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
> 



More information about the HTML-FormFu mailing list