This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

How to hook into the _submit and _validate functions of existing form

Hi,

I'm trying to customize the privatemsg module by creating my own privatemsg_ext module that hooks into it. By using form_alter I added some form fields to the privatemsg_new_form.

Now I would like to overwrite the privatemsg_new_form_valdate and privatemsg_new_form_submit functions with my customized functions in my module. But I don't know how to do that. It seems that $form['#base'] only works if the functions corresponding to the form id do not exist (and they do exist in privatemsg).

How do I insert two nodes at once?

Here's the scoop...

I need to have the user create a 'contact' node. Within the 'contact' node, the user has the option to associate the 'contact' with a 'company'. The 'company' field auto-completes for 'company' nodes that already exist, however, if the entered 'company' doesn't exist, I need to have it automatically create a new 'company' node, both in the node table and in the associated 'company' table.

Linkpoint API for Drupal 5

I am in the process of reworking the Linkpoint API for Drupal 5. Im new to drupal and have run into a problem with the module. I keep coming up with Invalid XML. Here is the code:

example of using pager_query()

Can anyone show me an example how to use pager_query() which is more detail than the example in http://api.drupal.org/api/HEAD/function/pager_query.

NodeAPI Clarification Question

In my own module, I need to add a new supporting node of a different type during the hook_submit() function of a new node just being created.

In the following piece of code, I understand would be placed in the comment.module file, for use by other modules to insert a new comment. However, how exactly does this get called from another module?

For example, I see this (the below code is just an example) being called from a hook_submit() function from the module I'm developing. Would that be a correct assumption as a possibility?

TinyMCE Not Working Correctly

I successfully installed TinyMCE and am able to use the WYSIWYG just fine when creating new content such as stories and pages but when I try to edit the story/page I just created, along with ones I created prior to installing TinyMCE, the WYSIWYG will not appear. I can hard code it into my page.tpl.php and it shows up just fine on every editing page. However, when I rely on the non hardcoded version of my page.tpl.php it won't show on any story/page edit section. It works fine for commenting on every page/story though which is weird.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions