[html-formfu] Patch for H::F::ObjectUtil::remove_element issue,
submitted poorly :(
Carl Franks
fireartist at gmail.com
Sat May 30 20:42:21 GMT 2009
2009/5/30 Mike South <msouth at gmail.com>:
>
> I had a Repeatable block which had a delete_if_true checkbox in a
> child block. The remove_element call that gets rid of the
> delete_if_true box on an empty_row was croaking (this is because
> get_fields recurses, but remove_element doesn't).
>
> I submitted a patch with a test on google code, but I did the
> summary/name poorly and I didn't identify it as a bug, etc. (First
> time using google code, I didn't realize I wouldn't be able to update
> what I submitted). Sorry about that!
Hi Mike,
Sorry, this is the intended behaviour, and I'm not keen on changing it.
Though, you could use the following idiom to achieve what you want:
$field->parent->remove_element( $field );
Carl
More information about the HTML-FormFu
mailing list