Questions tagged [drupal-modules]

Drupal modules are add-ons for Drupal that allow you to extend, and customize Drupal functionality. Use this tag is for questions about available modules hosted on www.Drupal.org.

Examples of Drupal modules are Views, Token, CCK, and Pathauto.

The Project Usage Overview contains a complete list of all available modules for Drupal. This includes a ranking about the number of reported installs for each module.

Get access to all sorts of resources for any Drupal module via drupal.org.

2207 questions
6
votes
2 answers

drupal 7 show/hide field for a role

is there a module to show/hide fields to a specific role in Drupal 7? I know Field Permissions Module, but it is not exactly what I need. I have two fields: picture picture_premium and these roles: anonymous authenticated premium the picture field…
lorenzo
  • 187
  • 2
  • 8
6
votes
1 answer

Creating Custom Field Formatter is not working

I'm trying to create a new custom field formatter for text fields but nothing is showing at all. I tried un-installing and re-installing the module and flushed the cache many times, and nothing worked. Here's the code I used /** * Implementation of…
Muhammad Reda
  • 26,379
  • 14
  • 93
  • 105
5
votes
2 answers

Using US Military Common Access Card (CAC) Personal Identity Verification (PIV) for authentication in Drupal

I have a requirement to enable logging into a new Drupal powered site using the military Common Access Card/Personal Identify Verification system. I have come across this module: http://drupal.org/sandbox/larquin/1292622 but there is no code. Is…
Yermo Lamers
  • 1,911
  • 14
  • 25
5
votes
1 answer

Drupal hook_views_post_execute not getting called

I'm trying to hook into the hook_views_post_execute event in Drupal 7, my module called foo is located in sites/default/modules/features/foo. My foo.module file contains a definition for the hook_views_api function, defined like this: function…
thr
  • 19,160
  • 23
  • 93
  • 130
5
votes
1 answer

Apply Drupal 8 Patch by Composer for fix multi fields on Signature Field

I try to patch the Signature Field Drupal module. I follow this tutorial (https://groups.drupal.org/node/518975) but I don't get any changes. What I try: 1-Run: composer require cweagans/composer-patches 2-Edit the composer.json "extra": { …
Nasser Ali Karimi
  • 4,462
  • 6
  • 34
  • 77
5
votes
3 answers

Create a standard page and table in drupal module with PHP

I made a module with a simple menu structure. I am able to programmatically retrieve a view of all my students in PHP. Now, I want to return all the students on a page in a simple table. How can I make a standard page? How can a return the values…
user001
  • 441
  • 3
  • 8
  • 24
5
votes
2 answers

CakePHP and Drupal 6 need to talk to each other, but how?

I have a CakePHP app which needs to take data from Drupal (6). Specifically, there is one custom content type and one webform that need to be shared with CakePHP - so when a new node for that content type is added, or a webform submitted, Cake…
Will
  • 1,893
  • 4
  • 29
  • 42
5
votes
5 answers

Techniques for building Drupal Modules Quickly?

I'm looking to see if anyone has any resources or tips for developing basic Drupal modules faster? Have you come up with anything to make your Module development faster? The Drupal module documentation is kinda hard to understand and pretty…
wajiw
  • 12,239
  • 17
  • 54
  • 73
5
votes
2 answers

Turning Off Drupal 7's Cache

Is there a way to run Drupal 7 in a "non-cache" mode while developing new modules? My specific need is to turn off any caching of modules and/or module information during development so I don't need to clear the cache when I make my changes, but…
Alana Storm
  • 164,128
  • 91
  • 395
  • 599
5
votes
1 answer

Drupal multiple custom field required, pass validation if field is empty

I've build a custom field with several values. I've to make this field required. But I want to pass the validation if at least one field is filled and the last one is empty. But my problem is Drupal warn me that the last (empty) field is required.…
Syscall
  • 19,327
  • 10
  • 37
  • 52
5
votes
4 answers

how to display node hit in drupal?

i want to add page hit to nodes on my drupal site.how can i do that?
hd.
  • 17,596
  • 46
  • 115
  • 165
5
votes
3 answers

drupal----confused by the argument $form_state

this is an example form the pro drupal book. function annotate_admin_settings() { $options = node_get_types('names'); $form['annotate_node_types'] = array( '#type' => 'checkboxes', '#title' => t('Users may annotate these…
runeveryday
  • 2,751
  • 4
  • 30
  • 44
5
votes
5 answers

Sending email with attachment

I've a custom form (created with form API) that need send an uploaded file by email. The current form submit handler sends the email without attachment using drupal_mail(). So I'm looking for a solution to properly send email with attachment from…
Pierre Buyle
  • 4,883
  • 2
  • 32
  • 31
5
votes
4 answers

hook_form_alter not working

Im using drupal 6.16. The below code for hook_form_alter is not working. Im simply trying to change the 'Log In' to 'Sign In' on the submit button of the user login form
joe_h
  • 51
  • 1
  • 2
5
votes
1 answer

Drupal 7: Add Item to Admin Toolbar/Menu Programmatically

I'm building a fairly involved module for my company with a number of different configuration pages. I'd like there to be a menu item in the admin bar across the top that has all the sub menu items as well. I know how to add a single item to that…
LoneWolfPR
  • 3,978
  • 12
  • 48
  • 84