I'm needing to conditionally remove or disable a FormFu element (Radiogroup) from within a Catalyst action/method. My first inclination was to simply make it readonly or hidden, but I soon discovered that adding those attributes via the 'add_attributes' method would only apply the attribute to some outer span and have no effect on the radio buttons themselves.
I'm now willing to accept just simply removing the element (Radiogroup) altogether. My strategy was to use one of the 'get_*' methods to retrieve the element, then use the 'remove_element' method to remove it. However, remove_element seems to be complaining that "element not found..." in which ever way I call the method. Of course, I've confirmed that the element is indeed being found by the 'get_*' method.
Here's a little code snippet of what I've got in my action:
if ($row_object->row_attribute) { my $foo_element = $form->get_field(type => 'Radiogroup', name => 'foo_element'); $form->remove_element($foo_element); }
Maybe someone can see what I'm doing wrong, or they can suggest an alternate strategy.
Thanks allIn reply to HTML::FormFu element removal... by s2cuts
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |