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
0answers
190 views

It is possible to alter the $form_state['redirect'] of a previous submit callback?

For example: function awd_form_alter(&$form, &$form_state, $form_id){ dpm($form_id); if(substr($form_id, 0,22) == 'eck__entity__form_edit'){ $form['actions']['submit']['#...
0
votes
1answer
456 views

How do I insert a user picture's thumbnail on the “Submitted by” field?

I want to insert user picture's thumbnail on "Submitted by" field, which is displayed in teaser such as the following. Submitted by [some_user] [someuser picture's thumbnail] on xx/xx/xx How do I ...
1
vote
1answer
615 views

Nivo Slider jQuery plugin Not installed

I´m trying to install Nivo Slider to my website. I was following this tutorial from the official plugin website. I have the folder "all" an inside it I have "libraries", "modules", and "themes". I ...
0
votes
1answer
577 views

View modes are stuck on default view

I had my site for quite some time and just started to use the display suite view modes feature for changing the displays per node. I made new view modes and tried to change them for my nodes, but it ...
1
vote
1answer
466 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 ...
0
votes
1answer
958 views

View field with JavaScript code in it

I have content type which has text field. Each node has its own javascript code which is set in to the text field. Text field is PHP Code format. When I add this field to Views block site load ONLY ...
0
votes
2answers
509 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
1answer
516 views

Place the language switch in the main menu bar

The language switch appears on the bottom of the page. How can I move it to the main menu?
1
vote
4answers
2k views

Registered custom block not showing up

I tried to register two custom block in my custom_blocks module with the following code. function custom_blocks_block_info(){ $blocks = array(); $blocks['featured_items'] = array( 'info' =>...
2
votes
1answer
732 views

How do I change the order of the form elements?

I am using Drupal 7, and trying to make a custom register form to fit my needs. I am also using a contrib module named "Auto Assign Role" to let the user choose his role. Now heres the issue, the ...
0
votes
1answer
497 views

Multiple pagers in one page

I have a view with two separate displays that is used in one single page. Both the displays are using a pager. To get things working I set a unique id for each pager under pager options. This works ...
1
vote
1answer
478 views

How to add custom price for custom line items added using commerce customizable products?

I have created custom line items using "commerce customizable products" module by following the steps provided in this screencast. I want to add custom price for each added custom line item and it ...
3
votes
5answers
22k views

CKeditor adds extra <p> tags

CKeditor adds many <p>&nbsp</p> tags for all new lines when editing as HTML source. I found a discussion: http://drupal.org/node/669114 But I don't understand, how to fix it. If ...
0
votes
0answers
18 views

Module configuration lost after some hours

I have a D7 web and I have installed Yoast module and Scheduler module. I have enabled those modules for blog content type, and when you create a new blog content you can use real-time seo (yoast) and ...
1
vote
1answer
679 views

Replace textfield value on ajax callback

1) Am i missing something here? it's not replacing the textfield value. 2) Also how do i replace if i have a multiple textfield and multiple button in a form. <?php function test($form, &...
1
vote
1answer
514 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 ...
1
vote
1answer
518 views

Programmatically update field collection data in custom entity

I am in desperate need of help. I have a custom entity called Question which has a bundle called data. Within the data bundle, I have a collection field called options with two subfields called ...
0
votes
1answer
694 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 (...
0
votes
1answer
722 views

How to redirect to modal?

I use the module "Bootstrap Login Modal". How to redirect /user/login to <a href="#" data-toggle="modal" data-target="#login-modal"></a> all over the site ?
2
votes
2answers
543 views

How to run custom function after clicking next on a multi page webform

I've created a multi page webform and I want to run a function after the user clicks the 'Next page' button on the first page only. After the user fills in the data on the first page, I want to grab ...
1
vote
3answers
755 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
2answers
984 views

Displaying the submitted values in a table

I created a custom form and after the form is submitted I need to display the submitted data in a table? This seems like a very simple problem. I am able to use dpm() and drupal_set_message() to ...
0
votes
1answer
612 views

Add radio buttons and text field together to theme-settings.php

I want to integrate a CSS switcher into my theme, but without the Color module. So I want a radio button list, (or a select list, or dropdown, doesn't really matter), with a list of different styles, ...
0
votes
2answers
545 views

Organic-Groups multisite architecture

I have a task to build a series of websites all related to the same core business. Initially, I was going to build each one as a separate website. Later however, I was told the sites have to be able ...
0
votes
1answer
822 views

Table Pager Rendered in an Ajax Callback Shows White Page

I have the callback function below that renders a table with a pager. Every page of the table is 20 rows. Below is the code: function myid_print_all_submitted_id_callback($form, &$form_state){ ...
0
votes
1answer
551 views

Create bulk nodes - PDOException

Problem I'm trying to create multiple nodes at once using a CSV file for the data. However my script only creates the first 25 before it throws the following error. Any ideas what might be happening? ...
1
vote
1answer
708 views

Why do I get “Command pm-disable needs a higher bootstrap level to run”?

Running drush dis varnish in the Drupal directory gives give me this message. Command pm-disable needs a higher bootstrap level to run. Running drush --debug dis varnish -y gives the following ...
3
votes
2answers
689 views

how to change the url based on region and language selection in drupal 7

I have five different regions and five different language. When loading my site url like domainname/regionname/langname .When user change the language or region url will be change selected region ...
1
vote
2answers
640 views

How to display the output of my module without clearing cache and refresh page?

I created a very simple module which generates a tag cloud based on user input; you can see the code here. // wow.module function wow_menu() { $items = array(); $items['wall/of/words'] = ...
1
vote
1answer
932 views

Conditional display of paragraphs items

We use Paragraphs quite extensively in our site. We have about 10 bundles available. What we' like to do is alter how the paragraphs are displayed on various pages; Ie, we'd like to remove bundle a ...
0
votes
1answer
508 views

“Page not found” or “Forbidden” when submitting form Is it a problem with Apache?

I have some reseller hosting and I am running Drupal 7 sites on several different accounts there. I recently noticed a problem when updating one of them. It happens when I am editing content or ...
0
votes
2answers
663 views

Custom Image Background in Block

I tried Dynamic background module but it seems it's not what I am looking for. Is there such a module that will allow me to change the background for a certain pages or group of pages that works the ...
4
votes
1answer
648 views

Import URL Alias with Node

I'm using ne-impot and ne-export with drush for importing and exporting nodes. When exporting, as part of the uuid module, the URL alias is included with the export. However, when importing a node, ...
2
votes
1answer
159 views

why can't I create comment using rules?

Simple rule: after update node: create new entity with type: "comment" but after update node, nothing happens... why that? UPD, added screenshots of my rule: UPD2: i can create node by creating ...
2
votes
1answer
562 views

autofill from taxonomy term fields

I'm trying to connect a field of a taxonomy term to a field in a content type, something like this: Auto-Fill from on content type to another I tried this on a node and it's working, but now I have ...
0
votes
2answers
21 views

Menu hook callbacks not working for anonymous users

My custom error handler module is somewhat based on the customerror module, but instead of returning markup, my menu callback function redirects based on the original path. It registers error paths as ...
1
vote
2answers
689 views

Add conditional javascript from CDN (external library)

I know it has been discussed here several times, but: Is there a way to include conditional JS from CDN in the head section? My goal is to somehow use drupal_add_js, external. That will stick in the ...
2
votes
1answer
475 views

Pricing changes based on line item fields in the add to cart form

I've been using commerce_custom_product to add custom line items options to products I'm selling in the shop. The shop is selling servers and if someone when adding a server to their cart wants a ...
3
votes
2answers
1k views

Programmatically creating a node doesn't save custom fields

I'm using this code in Rules, after saving a certain type of content, in execute custom PHP code. By now, i'm just trying to create anothe node of that type after the first is created. The problem is ...
0
votes
2answers
586 views

How to tell what user created a user

I currently have my drupal 7 site set up such that users of role 'doctor' create users of role 'patient' via the admin/people/create. I was wondering if drupal 7 stores data about which doctor made ...
1
vote
1answer
631 views

Importing shapefiles/kml

I need to add support for importing either kml file or shapefiles, preferably using feeds. The idea is that each record relates to a single node, and the file uploaded could contain hundreds of new ...
0
votes
1answer
516 views

How to show a custom form in a block?

I have a custom form which currently shows on a page. The form is submitted via ajax and the view embedded is also updated via ajax. I do not want to show the form on a page. Instead I want to show it ...
0
votes
2answers
548 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 ...
2
votes
1answer
632 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 ...
0
votes
1answer
837 views

Creating paragraph entities and adding to a node

I am using the Paragraph module in and I need to programmatically create paragraph entities and attach them to nodes. Using the following code in a for-loop: $paragraph = new ParagraphsItemEntity(...
0
votes
1answer
487 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
1answer
557 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 ...
2
votes
1answer
872 views

Modal form file upload is not working

I am trying to use ctools modal form to edit node form. This form is containing a file field. The Form is rendering properly. When I try to upload a file on clicking upload button, file field has been ...
1
vote
1answer
465 views

How do I fill the authors name in a term reference field using Rules?

Content type stock contains the term reference field field_producer. What is the rule for Rules in order to fill this field with the node author name on creation? In detail The form looks like: -- ...
1
vote
1answer
715 views

How to force Drupal to translate current path to another language?

How to get path to current node but of another language? Available languages: English (URL prefix: en) Polish (default, no URL prefix) Enabled detection methods: URL (by prefix) Session (parameter:...

1
3 4
5
6 7
528