Set select list option value

Set select list option value

I’m trying to set value of select list programmatically with hook form alter I have select list with options: $options = array(125 => ‘USA’); and setting value like this... read more
Set select list option value

How to copy select list value from a webform submisison into select list field new node?

This is the scenario: A webform with the following fields Question -> Textfield Category -> Select options (Listbox) Listing vocabulary HETCAT A content type Question with these fields Title Category -> Term reference listing vocabulary HETCAT Once the... read more
Set select list option value

Entity Translation: Translate breadcrumb

I’m having issues translating breadcrumb. Everything works, menu items, strings etc… a part from breadcrumb. I’ve tried hook_menu_breadcrumb_alter to reset the title with no success. How can I translate breadcrumb? read more
Remove links from the menu tabs

Remove links from the menu tabs

How can I remove the some links from the Tab, when we are login as a particular user. Please see the below picture. I want to remove the tab Items maked in red rectangle (deny access to this link). I tried with hook_menu_alter, but it do not worked and also... read more
Set select list option value

Hide node created messages programmatically

I’m trying to the node created messages for a certain content type, but I can’t use Disable Messages because it has a conflict the Commerce Add to Cart Confirmation module. All the other methods (like the ones here) I’ve found either hide all status... read more
Set select list option value

Apply comments votes to parent node (with Rate module)

My site have a fivestar field in comments, where users gives their vote and the points are applied to the parent node. This is possible using Fivestar module, following this instructions:... read more
Set select list option value

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 $ drush pmi I get the following output: Command pm-info... read more
Set select list option value

Node add form alter & submit custom field

I have a content type “event” with a field called “field_pricelist”. It’s a dropdown with no values, I add the values when I alter the form. The values come from a custom table (install / schema) in my database. I want to save this custom... read more
Set select list option value

Is there a function to get the system path for the current language?

If I’m using multiple languages on the site with path prefixing, is there a quick way to get a system path for the current language? For example, if the current language is English, and I’m interested getting the English path for... read more
Set select list option value

Altering Webform email %value before sending email

I summon your wisdom on this day because I can’t figure out how to alter submitted Webform values that are used in email templates. Here’s my situation: I have a “contact us” form (set with Webform API) with first name, last name, email and... read more
Set select list option value

Create Taxonomy term with added text and date fields, then display them in "add content"

I’d like to add a date field (“date”) and a text field (“notes”) to a taxonomy term (“Category”). Easy enough. When I add content, I have the taxonomy term linked using term reference, and it is working fine. What I... read more
Set select list option value

I can’t add to cart without HTTPS enabled [closed]

I have a Nginx server with Varnish that runs a Drupal Commerce website. The Add to Cart button doesn’t work on a session without HTTPS. I’d really appreciate any help. read more
Set select list option value

Solution to migrate a field collection

My requirement is to migrate content nodes in xml format to drupal 7 content type fields.The xml contains a node which has to be field collection in drupal.I know how to migrate field which are enity references and term references.But i am new to field collection... read more
Set select list option value

views with multiple contextual filters – should return data only when both or any one filter is present

Views of content is having two contextual filter. For some reason node object is available to views so it is passing through url’s 7th argument. 1.Content: Has taxonomy term ID Configuration: Php Code $nid = arg(7); $node = node_load($nid); if($node &&... read more
Set select list option value

Using Entity Reference field, get the parent NID in referenced entity (node)

I have a node that holds an entity reference field (multi value) to other nodes, all the referenced nodes of the same type. In the referenced nodes I have a computed field that do some calculations. Also, in the parent node I have a computed field that takes... read more
Set select list option value

Apache Solr Search proper syntax in url?

Can anyone provide some info on how to properly execute a filtered apache sold search through the url? So far I’ve figured out that ?fq[]=bundle:type will return a results filtered by that bundle type. I’ve also noticed that ?f[0]=machine_name:value will... read more
Set select list option value

use-ajax class for ajax link not working in dynamic content load

use-ajax class link not working when i load new content using custom ajax code, which has the use-ajax class links. I use normal jquery ajax to load the content because, i have drag and drop functionality which use ajax to load new content i tried a lot but... read more
Set select list option value

Create duplicate registration form with extra fields

I have a site built using Drupal 7. The site has a registration form now. There is a new requirement to add a couple of new fields in the registration form and put it in a new page. http://example.com/register is the existing registration form and user submitting this... read more
Set select list option value

rewriting results in view: trim from the back

I am working on Drupal 7 Omega Subtheme, Panels Views. In one of my views I have a path field which displays the whole url and I need only the last 6 characters (6 digits, to be precise. Also, if it helps – part of the URL I want to get rid of is fixed.) Under... read more
Set select list option value

How do I connect to an external database and specify the schema to use?

I want to connect Drupal to an external Database and I need to specify the schema on the settings.php file, otherwise Drupal schema module connects by default to the ‘public’ schema. I tried, without success, with the following code.... read more