[Catalyst] Changing Formhandler field-type/widget based on
2012 at denny.me
Thu May 24 08:46:28 GMT 2012
On Wed, 2012-05-23 at 23:24 -0500, will trillich wrote:
> Short version: How can we toggle field "X" from being a Select (popup)
> for Admin users, to being a Hidden (nothing visible, but the value is
> maintained) for Manager users?
Short answer; don't.
If you're maintaining the value for users who aren't allowed to change
it, then you don't want it in your form data. Form submissions can be
spoofed, so you'd have to double-check the value (or drop it) in your
Perl code anyway... so you might as well just do that, and remove it
entirely from the HTML (which seems to be a simpler problem?)
More information about the Catalyst