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

hook_validate modify node?

I'd like to insert some custom content into my custom node in the hook_validate function, but when I modify node in that function the changes do not get saved and they do not show up in the node passed to hook_insert. Here's my code:

User Profile on multiple pages.

Is there a way to get user profile on multiple pages like

Page 1. Title : "Contact Information" will have fields like First Name, Last Name Middle Name etc...

On successfull submitting Page 2 appears

Page 2. Title : "Current Position" will have fields like Profession, Title , Institution etc...

Wrapper for a collection for form elements

OK.. I am neither a Drupal or PHP wiz, but I have made some progress with the forms API, and form_alter, but I still cannot figure out how do this, and am hoping a drupal guru can solve it.

I want to put a div around only SOME of the form elements in the $form array.

Let's take for example the collapsing fieldsets used for various admin settings in many modules.

I have a "tweaks.module" where I can do a form_alter and modify individual forms and their child elements. That's pretty easy.

But I want to wrap N number of fieldsets (or other elements) in a div with a custom class in the many nodes that have settings.

So I need to know where and how I hook or hack the array of elements and add this parent container element. I think I can flag the elements I want in the set by settign a flag via form_alter like $form['title']['in_group'] = 'true' for each element i want to include in the set, but....

where would I then read these values and surround of them with HTML source that the rendering system/forms API won't choke on? And how?

What I want to end up with is:


<form  id="some_form">
 <div class="my-class">
 <fieldset>
 </fieldset>
 <fieldset>
 </fieldset>
</div>
  
<fieldset>
   Not included in wrapped set
</fieldset>

</form>

Anyone have a strategy for this?
If I sound clueless, I largely am. Be gentle with me :)

About OG's imge logo?

how can i give every OG a image logo and let the image logo display in “my group” block and “new group” block?

why use vid for two completely unrelated things?

this is not really a support question but god forbid someone reading it elsewhere would disagree...

i notice that the new 'node_revisions' table is using 'vid' as its primary key. which seems to be needlessly confusing, since vid is already the primary key of the vocabulary table. i was looking into the history and found this:

"Sat, 11 Dec 2004 12:26:02 +0000 : Dries

This patch is _much_ needed so I'd love to see someone revive it. In
order for this patch to be accepted, the following needs to be done:

How do I pass an image from a file to the screen?

Hey all

This has been driving me absolutely crazy for about two hours now... All I want to do is pass an image file to the browser, however I can't use print theme('image', '/tmp/image/hello.jpg'); because it's not visible to the webserver... Surely there's some (easy) way to pass an image for output, or do I have to file_copy it to the tmp directory just so it can have a web address?

Any help is very much appreciated, thank you.

Pages

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