[development] Question about Forms API?

Mark Fredrickson mark.m.fredrickson at gmail.com
Thu Nov 30 23:00:02 UTC 2006


> I have never heard of a valid use case of someone setting #input outside of hook_elements.

How about in a #process function? I'm working on form element to
return node ids by selecting nodes out of a view. In my #process
function I've was running into problems trying to work with the
exposed filters - the values of the from the exposed filters would be
returned along side the nids I selected. This would cause "illegal
option selected" errors.

I still working through the issue, and I've started by form altering
_every_ form that uses my element, but I'm wondering if perhaps
setting #input to false for the exposed filters section of the form
wouldn't be the correct behavior. Then I could read from $_POST in my
#process function.

Does this sound reasonable to anyone? Or should I continue down the
form_alter path? Opinions welcome. Code that demonstrates something
even more welcome.

Thanks,
-Mark


More information about the development mailing list