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

THIS FORUM IS NOT FOR "What module..." or module support questions-- it's for module development and code related questions.

The module development and code questions forum is intended to aid those who are developing modules or writing code for Drupal.

Please note that this forum is also not intended for "Is there a module that does..." or "I need help with module x..." questions. It's also not a place to ask developers to write your code for you. Please respect this.

Please do not post general discussions intended to target module developers. If the question you have isn't specifically related to writing a drupal module, please post it in a more appropriate forum.

  • If you you have drupal installed already and are seeking a module that does a specific task, have a question about a specific module and what it does or if it will fit your use case, please place your questions in the Post installation forum.
  • If you have a problem or question about a specific module, you should create an issue in the module's issue queue (after checking for an existing issue first).
  • If you don't have drupal installed yet, please place your questions in the Before you start forum.

File field callback on selction

I’m working on my first complex module. So far things seem to have been quite easy to get answers to (well, not real easy), and now I am working on a module that will be far more complex than the others, and I am going to need lots of help along the way.

For starters, the module creates three nodes. In the first node the form needs to upload an image. Rather than upload the image upon selection, the image will only be uploaded when the form is submitted.

hook_menu callback isn't working


I have this very simple code:

Form - preview the submitted data


I made a page with a form (my_form), when the "submit" button is pressed, a function save the data in the database (save_function). The date are then used by an other page (display_plage) which display the data in a specific maner.

I would like to improve my_form by adding a "preview" button which will allow the user to see his data as they will be displaied.

I can't find how to do it...

Custom field in image widget won't save user input

I'm learning to make custom modules in Drupal 7 and I've managed to put some code together that (almost) does what I want. When I edit the existing node with the image field, it will not save my changes to my custom fields. Any idea what I'm doing wrong? Do I need to include another function?

if else statement

Perhaps a very simple question for some :)

I would like to know how to write an if / else statement with the following.

What i basically want is to have a 'read more' appear only when the href is filled in, and if not, the entire line is not shown.


Subscribe with RSS Subscribe to RSS - Module Development and Code Questions