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
1answer
424 views

Assign textfield to each checked option in a checkboxes field

Lets say I have a checkboxes field and when I check one of the options, I would like a textfield to appear so I can assign a number (quantity) to it. Every option I check would have its own textfield. ...
1
vote
1answer
437 views

Blocks aren't being assigned to a region

Is there any reason that these blocks wouldn't be assigned to the regions specified? The only way I can get these to appear is to set them manually. Kinda defeats the purpose of defining a region in ...
1
vote
1answer
467 views

default value imagefield -> get from field collection item

I've got a contenttype "gallery" with an imagefield "thumbnail", used in listviews oder teaserviews. This contenttype also has a field collection with "image", "title" and "description". So what would ...
3
votes
1answer
401 views

Adding images to a node

Is there a way to programmatically add an array of images from a particular file path? I want to add all the images from one folder in my drupal site and add fancybox styling to them. Can this be done?...
1
vote
1answer
594 views

Views math expression or Computed field to find date difference in views

I have two content type, Bill (Type1) and Cash Receipts (Type2), Type2 referencing Type1 when cash is received. In Type1 I have date field called (Bill Issue date), and Type2 I have date field cash ...
48
votes
6answers
39k views

Programmatically create a user and assign a role

I'm programmatically creating a user with the following code. $newUser = array( 'name' => $mail, 'pass' => 'password', // note: do not md5 the password 'mail' => $mail, 'status' =&...
2
votes
1answer
560 views

How to manage reservations with a 2 hours duration without duplicate bookings?

I want to make a calendar view that will show when music teachers are available, so that students can register online and attend a lesson. The courses have all the same duration which is 2 hours. For ...
1
vote
1answer
589 views

How to make blob file downloadable?

I have created a Module to make blob file available for Download in Drupal 7 . Below my code for .module file <?php function blobfile_block_info() { $blocks = array(); $blocks['...
0
votes
1answer
547 views

Trying to pass id to the ajax callback function, keeps overwriting, how to solve this?

I created a form which have a lot of images and a delete button on every each one of them. I used ajax to create a callback function which would delete the image. Here is part of my form: foreach($...
0
votes
1answer
1k views

Include Lead Forensics code in all pages

I'm trying to include the tracking code Lead Forensics gave me. The code is: <script type="text/javascript" src="http://www.path-trail.com/js/11111.js"></script> <noscript><img ...
1
vote
2answers
479 views

Synchronize commerce stock for product variations

I am selling tickets to a class at multiple price points (think student, adult, senior), and each class has limited seats. I have the product display working great using product reference with inline ...
0
votes
1answer
11 views

Entity reference additional field

In D7 I have two new node type defined e.g. branch and leaf. The branch is a collection of leaves that I'm referring to using the entity_reference module. In the picture below the leaves are the nodes ...
0
votes
1answer
15 views

Incorrect string value: '\xF0\x9F\x92\x99' for column “'comment_body_value'”

How can I fix the following error I get from a Drupal 7 site? Incorrect string value: '\xF0\x9F\x92\x99' for column "'comment_body_value' I read it is about users posting emojis that cannot be ...
1
vote
1answer
677 views

Associate an image with each checkbox

I'd like to have a graphics-oriented Webform, wherein the user will select from check boxes that have a specific image associated with each. For instance, I might have a row of checkboxes with a color ...
1
vote
1answer
465 views

Form submit POST renders page before submit handler is called

I have a search form in the header that is simply adding a search term to the current URL. If you are on example.com/list-page and submit a search, it just sends you to example.com/list-page?search=my-...
0
votes
1answer
524 views

How to configure gmap in template file

I override node display for content type Match Fixtures by creating node--match-fixtures.tpl.php file and put code below: <?php $location = $content['field_stadium'][0]['#locations']; $stadium_map ...
1
vote
1answer
337 views

Clear block cache in panels page

I'm having trouble with refreshing content in a block created with a custom module, placed within a panels page. My end goal is to display either regular or seasonal hours based on a set date range. ...
1
vote
1answer
544 views

How to subscribe to any or all taxonomy terms on one page?

I'm wondering about the best way to set up "subscribe to get email alerts" I have a content type which is "tagged" with various terms from various taxonomies and I want to set up a simple "subscribe ...
1
vote
1answer
455 views

Infinite Redirect Loop with PURL and spaces_og

I created a calendar feature for organic groups, and tried to enable it in a group with spaces_og. The page refreshes saying changes have been saved but the feature is still disabled. In the logs, ...
1
vote
3answers
3k views

Change order status string from “Completed” to “Shipped”

I'd like to change the order status string from "Completed" to "Shipped" to allow for better communication between us and the customer. Commerce Custom Order Status would sidestep this problem by ...
0
votes
1answer
4k views

Fatal error: Cannot use object of type stdClass Error help!

When trying to access my image file from my database i get this error: Fatal error: Cannot use object of type stdClass as array in C:\wamp\www\drupal-7.25\sites\all\modules\database\database_ex....
0
votes
2answers
728 views

Rendering a region in region--footer.tpl.php

I have my social media links in my sidebar_first region. And these social icons are included in my footer. So in region--footer.tpl.php, I have rendered sidebar_first region but it is not displaying, ...
4
votes
2answers
733 views

Contextual filter with hierarchical taxonomy terms

Using contextual filters, I have created a view which shows a page of users at us/california, based on a taxonomy I have made of locations. This taxonomy is hierarchical, though, so when the user ...
0
votes
0answers
12 views

Error copying file. Is there a permissions issue?

I have a process that fetches a file, then moves it (overwriting if already exists). The copy part fails, and I cannot determine why. Here is some PHP I am using to reproduce the issue I am seeing (...
0
votes
1answer
490 views

Image style is not rendering

My field_image is not rendering on user-profile.tpl. I have the following code (two different ways to render for testing): $image = field_get_items('user', $user, 'field_image'); $output = ...
1
vote
1answer
484 views

Referencing parent entity

I've just started with Drupal and I'm trying to create the following URL structure with PathAuto and Entity Reference: Category A -> Category B -> Category C Resulting in category_a/category_b/...
0
votes
1answer
484 views

Multiple blogs per user, each with a blog profile page

I'm trying to to create a site where users upon admin approval, can have multiple blogs, typically differentiated by language. Each blog should have a profile/landing page specific to that blog. I ...
1
vote
2answers
904 views

How do I create product variants?

I have a product (for example, "Desk") which has two attributes (size and life). Size has the values small, medium, and large. Life has the values 7 years and 10 years. The price is different for ...
1
vote
2answers
609 views

Set value for new field automatically based on another field

I want to add a new date field to an existing content type, and set the new field automatically for existing nodes to be equal to another date field from that content type. For example, if the new ...
1
vote
1answer
522 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 = { '...
0
votes
1answer
452 views

Displaying parts of main menu in separate blocks

I need to display my main menu in separate blocks: the first sub-menu in one block, and the following two sub-menus in another block. I'm using Drupal's native menu module and also the nice menus ...
0
votes
3answers
689 views

How to get a list of Users as values for a select list field?

How do I get a list of users of a specified role to populate a select list in node/add/* ? For example when creating a piece of content I want a field "Select Your Moderator of Choice" and the ...
1
vote
1answer
32 views

Migrating user accounts to Okta

I'm trying to migrate users exported from Drupal into Okta using the /api/v1/users API (specifically [creating users with import hash][1]), and am stuck, and desperate for help as I'm late on a ...
1
vote
1answer
517 views

Can 1 FullCalendar show dates from more than one content type?

I want to show "dates" and "Board Meetings" on my FullCalendar. How? Background info: In D7 I created a Calendar using the wizard, which shows titles and dates/times of events that I create using a ...
7
votes
2answers
2k views

How to setup event registration and paypal payment?

We have events and we take registrations for them. Entity Registration module is installed for that purpose and it's working great. Now, since those events are paid events, we want to implement PayPal ...
0
votes
1answer
476 views

How to print a table create with views, using a submit button below the view?

I created a custom template for my views (table) and I inserted a button below the table. By clicking on that button I would like the table to be shown in a new page, from which that table can be ...
0
votes
0answers
19 views

Add external script in head after CSS loading

My question maybe is a little bit strange. I have Drupal 7.x and i need to add in <head> a script to verify my adsense account: <script data-ad-client="ca-pub-xxxxxxxxxxxxx" async ...
0
votes
2answers
883 views

How do I get Facebook latest uploaded images for an account?

I am new in Drupal, I want to get all the images from my Facebook account and want to display them into front end. I tried Facebook Album Fetcher module but this module give me the facility to get ...
2
votes
1answer
510 views

Issue while modifying and importing the manually content type data

I have a scenario like this: I am using Feeds Importer to import one content type data. I am using GUID field as the unique field. Also, I am exporting these all the nodes of this content type using ...
0
votes
0answers
28 views

Can't access to my database while installing the site

When I try to install my Drupal site, I pass throughout the first 2 steps. When I type the name of database, username, and host, nothing happens. I only see the errors about username, database, and ...
0
votes
2answers
825 views

Base path and user picture uploading

So I recently migrated my site between servers. I think this is causing some issue with the base path of Drupal, which in turn affects the image upload path when a user tries to upload an image to his/...
2
votes
2answers
443 views

How do I send notifications for followers of a group when group content is updated?

I want to build such functionality that allow the user to follow the other users, and when the followed person is updating the information, the follower can get notified for what they are doing. I ...
1
vote
1answer
2k views

Webservice endpoint with hook_services_resources()

I've stumbled upon some limitations of the services module. I wanted to create the following endpoints: public/events/ public/events/categories public/events/resources public/blogs/ I wanted to ...
3
votes
1answer
570 views

How do you use hook_query_alter to get inside a query's creation?

I'm getting no love from hook_query_alter. I have a simple query to which I want to add a tag, while also adding a node_access tag. Thus the whole query looks like this: $the_nodes = db_select('...
0
votes
3answers
661 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=="...
3
votes
2answers
687 views

How can I set up free shipping?

I am having trouble setting up free shipping on my Commerce project. I added the Free Shipping module, but when I go to configure, I don't have any options. The shipping costs for all of our ...
1
vote
3answers
98 views

How to keep track of days online?

I'd like to display the total number of days that users were online in a View on their profile pages. How can I do this?
0
votes
2answers
1k views

Hide a view if there are no results

(Spin-off of Remove/Hide the block if the View is empty?. I find the other question a bit confusing, and want to reduce it to the essential question.) When rendering a view programmatically, and ...
0
votes
1answer
510 views

One click download button for webform submissions

I have webform submissions and want to download all its data with one click download button. Right now it show other options like below: But I want only a single download button for this. Is there ...
2
votes
1answer
629 views

Conditional fields not working with hierarchical select module

Case: I am using the Hierarchical Select module for allowing users to choose taxonomy terms from a particular vocabulary. Based on the chosen terms (deepest level), I want to display a field using the ...

1
2 3 4 5
531