User login

Adding a custom submit handler to a form with a CCK field?

I was thinking maybe a CCK field to tell a form what Salesforce lead "Source" categorization a form should have ought to be able to do double duty as the indicator that "this form should be sent to Salesforce as a lead."

However, that would require a CCK field to be able to add a submit handler that applies to the entire form it is added to, and I'm not sure they can do that.

Indeed, while people are increasingly used to the CCK way, it's clear this functionality should live on the main content type editing screen (where publishing options and some contributed module such as fivestar settings are currently). Then it is quite easy to add hidden form elements and custom submit handlers for the whole form with an implementation of hook_form_alter

Resolution

Searched words: 
Drupal CCK field custom submit handler for whole form

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.