Skip to main content

Questions tagged [7]

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

Filter by
Sorted by
Tagged with
0 votes
3 answers
1k views

Alter message status per content type

After hours trying to figure it out, no way ! What am I doing wrong ? function alter_appointment_message_form_node_form_alter(&$form,&$form_state,$form_id) { if($form['#node']->type=="...
1 vote
3 answers
1k views

How to create charts in Views using Google Analytics data?

I'm trying to generate charts in Views using Google Analytics data. I have the Google Analytics Reports module installed, but this module doesn't allow aggregation of data which make charts very ...
0 votes
2 answers
420 views

Insert Record Using db_insert in Block

I have created a block whose content uses the PHP as input filter. What I want to do is inserting a record into a separate database. The code I am using is the following one. $tracker = array( '...
1 vote
1 answer
630 views

Making a REST AJAX call from Basic Page

The following successfully calls a REST Services Module endpoint when contained in a module but I cannot get it to work within the script tags of a basic page. (function ($) { var myapi = { '...
1 vote
2 answers
511 views

create a custom field schema

When I create a new field programmatically, drupal create a default schema for my being added and for each new field added is create a new database schema. I noticed that the columns always have the ...
0 votes
2 answers
460 views

Ajax Form Not Working in some Some Regions

I created an ajax based contact form in my module.Then I made a block view for the form. I tried putting that block to several regions. When I put the block to 'Sidebar Second' the form works as ...
0 votes
1 answer
637 views

How do I create a file download popup form?

I am new to drupal, and I want to create a popup form with with form fields for name and email, and a buttom to download and to close the popup. When users click on the download link, the popup form ...
1 vote
2 answers
2k views

CKEditor does not work

The ckeditor on my site suddenly stopped working without changing anything. This is what I tried up to now: update all other modules and drupal core remove ckeditor clear caches of drupal and ...
3 votes
4 answers
3k views

How to use entity form in pop-up window?

I have created a view, and there is one column named "forward to delete". I want to open an entity form in a pop-up after clicking on this link and get the node id of the clicked node so that I can ...
2 votes
1 answer
948 views

Field with unique and auto-increments values

I have a content type that in one of their fields need a value that is unique and auto-increment. There are several obvious solutions: Use the node id that is unique and auto-increment. The Serial ...
1 vote
2 answers
3k views

Database query with notExists

I can't figure out how to select all aid's from the areas table that do not exist in the field_data_field_area_parent table. It almost works, except it returns Windy Ridge with an "aid" of "11". I ...
3 votes
3 answers
3k views

How to add onclick event to a link?

I need to create a link, which when clicked should be able to set a session variable. I have used l() function to create the link and tried this but this is not working. 'name' => l(t($n['name']),...
0 votes
1 answer
608 views

Symbolic links and the file_scan_directory() warning

I wanted to use the following symbolic link in my root directory: $ ln -s /data1/public/cases/ DownloadData Such that when users go to www.example.com/~user/DownloadData/file they are rerouted to /...
0 votes
1 answer
2k views

How can I disable the form confirmation message?

I'm referring to the green box that informs the user that they have successfully submitted their form. In particular, I'm wondering if I can remove it without writing any php. Is there anything in the ...
0 votes
2 answers
3k views

Custom user profile displays

I have added some extra fields in User entity like address, twitter account e.t.c. The requirement is that each user should be able to choose whether his profile will be completely public to other ...
0 votes
1 answer
541 views

How to validate a value against an existing field

I'm doing some custom stuff with programmatically saving fields with EMW: $wrapper->my_field->set('my_value'); Problem is, this doesn't validate before trying to save the field. How can I ...
1 vote
1 answer
634 views

Block Settings not applying to Zen sub theme

I've created a Zen sub theme using the Starter Kit enabled it, and set it as the default (I've changed very little from the Starter Kit). If I go to Structure > Blocks there is only a tab for the Zen ...
1 vote
1 answer
526 views

How to include XML file in node for js map rendering?

I have a clickable map that uses js, css and xml to display. I previously was provided solutions in a previous thread How do I implement a clickable JavaScript map? using drupal_add_css() and ...
0 votes
1 answer
1k views

Getting Bootstrap Carousel to set Active class?

I have a Drupal 7 site that has 2 Bootstrap carousels. One that rotates automatically and takes up the width of the page. One that has 3 smaller items and only when the page is narrowed (e.g. on ...
0 votes
1 answer
774 views

Integer user form field with min 11 digits and max 11 digits

I need an integer form field with has a validation of min 11 digits and max 11 digits. In other words; the user has to fill in an 11 digit code. How do i make this field and validation? Update: I ...
0 votes
1 answer
586 views

Gmap not displaying

I have Gmap and Location module. I have created a content type and also added a field location with term reference(Taxonomy term). I have just added a content and selected one location. But I can't ...
0 votes
2 answers
566 views

Error in executing drush command

I am trying to execute drush command from my project root directory and i am getting following error bootstrap a site that has not been installed or does not have a configured database. In this case ...
1 vote
1 answer
791 views

Scheduler module not working even after cron run

Installed 'Scheduler module' and try to publish a content on specific time. But it seems like it is not working. I tried with 'Run cron manually' also, But it doesn't ,While trying with Scheduler ...
0 votes
2 answers
626 views

Save form when user refreshes page from browser or click on any anchor tag inside page

I have made a form in drupal. What I want is when the browser unload the page from any click whether by clicking on anchor tag or from browser refresh buttons I want to save data of my form through ...
1 vote
1 answer
450 views

How to detect if "Show end date" is checked?

Trying to find a way to get the value of the checkbox "Show end date" on a date field on drupal 7. Is it stored somewhere in the database? Can't find it. Its definitely not in the $node object. Any ...
2 votes
3 answers
915 views

Hide products from a view

I know this may be very basic but I can't seem to figure out a way to hide a product that I've got set up in Drupal Commerce. I'm new to Drupal so thanks for your patience. I am using the Expressa ...
1 vote
2 answers
619 views

Is there a way to find internal links to a specific web page?

For example, for a page called mysite.com/about can you determine any other pages that link directly to this web page? The goal is to determine all of the webpages that exist in mysite.com that have a ...
0 votes
1 answer
2k views

Drush MAMP not working

I'm running with a big problem for hours now and it's driving me crazy, maybe one of you already know the answer. Drush seems to not want to work on my OSX (10.8.5) with MAMP (3.0.5). When I execute $...
0 votes
3 answers
247 views

What's the latest in the page lifecycle a module can send an HTTP header?

For CDN purposes, I am collecting the modified times of various pieces on the pag. I want to set their Last-Modified header. What's the latest during a request a Drupal 7 module can call ...
2 votes
2 answers
703 views

Using computed field value

I'm using Commerce module and I have a line item with a computed field that's calculating a date. This field finally shows a date. Then during the checkout process I have a form with a Date field (...
0 votes
1 answer
710 views

Passing arguments to a block

I am working on trying to understand the secrets of custom-developed blocks. Namely, I have a use case where a block need to pull content via EntityFieldQuery (this could be done with Views, but I ...
3 votes
1 answer
2k views

How can I show only first level terms on a dropdown taxonomy exposed filter?

I have a 2 level taxonomy tree: Countries and cities. I also have a view of content, all of which are marked by first level terms (countries) of that vocabulary. My taxonomy tree is like that: ...
1 vote
1 answer
520 views

Ajax error when installing

When installing Drupal 7.31 in the first page, I can't install with the following error message. An AJAX HTTP error occurred,HTTP Result code 2: debugging information follow, Path:htp://...
0 votes
1 answer
723 views

How to display the profile page in Modal window

By using ctools, i am able to display a form in modal window. Now i wish to display a page(the profile page) in modal window. Below is the sample code (call by menu page callback) to display a html ...
0 votes
4 answers
852 views

custom block menu path returns json Ok, but a 404 status header

I created a custom path via hook_menu with a page callback to a function that prints json. It all works in the sense that requesting: http://cms.tripchi.com/tripchi/getme returns my JSON, but the ...
0 votes
1 answer
715 views

ctools_modal_render() in a condition

I have the following code in my custom.module (using it in hook_init()): if ($js) { // Required includes for ctools to work: ctools_include('modal'); ctools_include('ajax'); } if (...
1 vote
1 answer
1k views

How to add alt tag to image from views

I have created views with image gallery. Now I want to add alt tag to image how can I do it. I have not enabled alt field in content type configuration. I want add alt tag to already existing images. ...
0 votes
3 answers
553 views

How to create simple confirmation page?

I want to create simple confirmation page. It means that after user change his email then he gets confirmation email with link to page. This link contains token. This link should open page for user ...
0 votes
2 answers
717 views

How to display all children on parent node for custom content type?

I have a custom content type, let's call it 'parent'. I have another custom content type, let's call it 'child'. I created a template file where I can display the 'parent' content type fields any ...
1 vote
1 answer
582 views

problems with entity translation insert hook

I'm using the entity_translation_insert() hook to set the value of a field when a node is translated. I can successfully edit the $entity from within the implementation, but how should I save the ...
1 vote
1 answer
976 views

Block overriding with template file doesn't work

The Drupal version I'm using is v7.34. I'm using sub-theme created from Bootstrap as base theme. My problem is, I want to override the "User Login Block" and put it in the header region (top bar), so ...
2 votes
1 answer
604 views

How to implement a Rules Action to loop through quantity of a products bought?

With the Drupal Commerce module, I created a new product type I use for selling points to my customers. The product has a custom field named “points” (field type integer) where I specify the amount of ...
0 votes
1 answer
1k views

Use body field for views nivo slider instead of title field

I'm implementing a Views Nivo Slider on a Drupal site. It's currently taking the title field for the caption and using the whole text as a link. How can I configure it to use the body field for the ...
3 votes
2 answers
2k views

How to prevent a PDO exception when using Rules to Set a data value after saving new content?

I need to write a rule that edits some elements of the node, as soon as it is created. Unfortunately Drupal doesn’t like that and crashes whenever you try to save the node within a rule that was ...
1 vote
1 answer
751 views

Passing values to a view block

I have a page that contains 4 separate blocks, from the same view, Items block 1 - this contains a list of item titles Items block 2 - this contains a different list of item titles Content block 3 ...
0 votes
2 answers
578 views

Limit the number of uploads per image field depending of role

I need a hook (or something similar) where I can set the number of image uploads depending of the role of the user. In the settings of the field there is no way to set the maximum number of values ...
1 vote
2 answers
531 views

hook_node_access() returning NODE_ACCESS_DENY is ignored

I am trying to block the current user from performing any action (view, update, delete) on a node. The user should only be able to view, update, delete the node being displayed if he is the owner of ...
0 votes
0 answers
16 views

#ajax callback doesn't work on form loaded via AJAX from a JavaScript file

Having trouble getting an #ajax callback to work, initially user clicks on a date on the calendar and an ajax request is made to get the time slots, the time slots form have an ajax callback attached ...
0 votes
3 answers
2k views

Send Mail After Checking Date Field Value

My content type (product) has a date field named Expired Date. All I want is like this: check value of expired date field from content type product. If value equal to 7 days from now, send mail with ...
1 vote
1 answer
535 views

Change the default timezone variable_get from views

What I want is to change the way drupal views get the site's timezone setting. I want to set it manually in code. Searching through the files I noticed that the function "views_get_timezone()" in ...

1
2 3 4 5
530