Agaric Design Collective

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

By Benjamin Melançon
on 15 Apr
0 comments

Key words and phrases

Drupal CCK field custom submit handler for whole form

Tags

Description

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

 

Post new comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h1> <h2> <h3> <h4> <h5> <h6> <small> <pre> <strike> <sub> <sup> <kbd> <s>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.