Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 1747

Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.

2 votes
2 answers
1k views

Loading a queue?

How can I use Drush to pass data into a Drupal Queue? function hook_cron_queue_info() { $queues['my_queue_name'] = array( 'worker callback' => '_my_queue_callback', // This is the callback func …
2 votes
2 answers
1k views

Forcing flag to be unique

In Drupal 7, using Flags (and possibly Rules or another contrib module) how can I force a flag to be unique for a specific content type. …
3 votes
2 answers
3k views

How to save JSON with a node

I'm using Drupal 7 and MySQL 5.5. …
25 votes
3 answers
15k views

Multiple Values to Trigger #states

How can I have multiple values trigger the Form API's #states? Say for example, I wanted this field to be visible not only if the value is 5 (currently works below), but wanted to make the field visi …
1 vote
2 answers
1k views

Change workflow default state with hook_form_alter()

How can I programmatically access and alter the Workflow module settings with hook_form_alter() on a node edit form? I can see the Workflow] module settings in its own field-set on the node edit form …
12 votes
11 answers
42k views

Programmatically set date fields in Drupal 7: Date, Date (ISO Format) and Date (Unix Timestamp)

Using the Form API and hook_form_alter(), how can I manually set (force) the values for each of Drupal 7's date field types using a valid Unix Timestamp? …
0 votes
Accepted

How to mandate the password policy in custom form fields?

You can use the 'password_confirm" #type in your form to get the exact field Drupal uses. Add this to your Form function. $form['account']['pass'] = array( '#type' => 'password_confirm', …
Citricguy's user avatar
  • 7,934
9 votes
5 answers
10k views

Accessing Additional User Profile Fields

I added a dozen or so new fields (in Drupal 7) to the user profiles using: Configuration -> People -> Account Settings -> Manage Fields (admin/config/people/accounts/fields) How can I access these values …
8 votes
4 answers
15k views

How can I add a field to a view that is calculated using other fields?

How can I add a new field to a view that is calculated using other fields? Is there a way native to Views to accomplish this? If the original view returns the row: X | Y | Z And I have a function …
14 votes
4 answers
17k views

Redirect to a custom page after a node has been added or edited

Using hook_form_alter, how can I redirect a user to a a custom page after creating or editing a node instead of the node that was created or edited? The current code for hook_form_alter() is the fol …
2 votes
2 answers
2k views

Route AJAX failure messages to console instead of popup

How can I prevent ajax failure popups and instead route the failure to the console log instead? Is this something I can do with Drupals implementation of jQuery?
31 votes
3 answers
13k views

Differences between value and safe_value

What are the differences between ['value'] and ['safe_value']?
20 votes
3 answers
31k views

Passing arguments to drupal_get_form()

How can I pass arguments to drupal_get_form() in Drupal 7? …
7 votes
2 answers
3k views

Attach a 5-star widget to a custom form

How do you add a FiveStar widget to a (non-node) form using hook_form_alter?
6 votes
4 answers
2k views

Which hook to implement to limit node creation?

I'm looking to limit the number of nodes that a user can create in Drupal 7. Which hook should I implement to step in before the 'add node' page is shown? …

1
2 3 4 5
9
15 30 50 per page