I am trying to add a textfield to the bottom of a node (for a specific cck type), that once (an authenticated user) submits, stores the value as a term in a taxonomy vocabulary.
What is the best way to do so?
I have tried adding the form to my subtheme's node.tpl.php file for a custom cck type.
I am having trouble with form validation. I'm able to submit the form properly, but get the red borders around the field that needs to be validated, instead of the message; Until I resubmit and the cached error message then shows. I get why it's happening - code executing prior to node.tpl.php load. See - How do I use form_set_error() the right way?.
If Form Builders are not supposed to be called from within a template file, how else can I add a form to a page? I'm sort of working off this form example tutorial
I started with this - Embed form inside a block - and since added this to my node.tpl - https://gist.github.com/1847060.
I'm still trying to wrap my head around using the forms api, so thanks for any advice.