Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
78 views

I have content type with name "Product" and there is field name Remote product link and field type is link. I want to set rel="nofollow" for this field. I am new to drupal and I am ...
shahzad shah's user avatar
0 votes
2 answers
274 views

I'm working with Drupal 8, but since this looks like a PHP problem to me, I'm asking it here and not on Drupal Answers. The isset statement in the following code should return TRUE, but it does not: ...
Orlando's user avatar
  • 499
0 votes
1 answer
64 views

How to design Drupal forms without coding a lot?
Dinesh Reddy Kancharla's user avatar
0 votes
2 answers
1k views

I have created a drupal8 module that programmatically created custom user fields. It display in Manage fields section but not enable/view inside Manage form display and Manage display section. I have ...
Durgesh's user avatar
  • 97
0 votes
1 answer
2k views

public function buildForm(array $form, FormStateInterface $form_state) { $form = parent::buildForm($form, $form_state); $config = $this->config('category_dynamic_block.settings')...
Srijeeta Ghosh's user avatar
0 votes
1 answer
899 views

I would like to know if possible in ADMIN, without modifying the admin template, by means of some module or extension do the following: I would need to be able to create the data entry form for ...
Javier's user avatar
  • 393
0 votes
0 answers
52 views

Where is the "Enable/Disable translation" value stored in the database? I haven't been able to find this info anywhere.
Keith Frey's user avatar
0 votes
1 answer
62 views

i am trying to create a node that have a field collection with multi-values, but this only save the first value and the second not. I am trying in the following way: "field_mobile_number_collection" ...
William Tapia's user avatar
1 vote
4 answers
2k views

Creating a sub-theme in Drupal 7's page.tpl.php and needing to pull the value (plain text) from field_EXAMPLE from a custom content type outside of where the rest of the content would normal be. <!...
BVSK's user avatar
  • 143
0 votes
1 answer
63 views

Question is quite simple: How to preserve file on server and in file tables, so its fid is still valid after unsetting/changing value with entity wrapper? $ewrapper = entity_metadata_wrapper('node', $...
Dainius Vaičiulis's user avatar
0 votes
1 answer
240 views

I have an entityreference field on node creation that allows you to select another node. I’d like to be able to let the user filter by content/node type, instead of seeing them all at once. (The nodes ...
UnsettlingTrend's user avatar
0 votes
1 answer
49 views

I'm developing a Drupal 7's module. I defined a node type named 'Booth'. Now in my module, I created a form with some fields like name, phone, address and so on. One of these fields is Booth which is ...
Matin Hajatdoost's user avatar
6 votes
3 answers
12k views

I created a custom module for Drupal 8 that allows the users to choose a Content type in order to add some fields programmatically. How I can create some fields (text type in this case) and attach ...
Alex Pezzini's user avatar
4 votes
5 answers
14k views

I created a custom form from a buildForm function. In this form, I would like add an image field. I can do that via this code : $form['main']['image'] = array( '#type' => 'text_format', '...
spacecodeur's user avatar
  • 2,466
9 votes
4 answers
24k views

I want create programmatically a custom content (custom content created via the admin UI). But, before the creation, I want check programmatically the types of fields of my custom content My custom ...
spacecodeur's user avatar
  • 2,466
1 vote
1 answer
89 views

We would like to get label for the field. As per previous question: How do I get a field label by the field name? But I need to get this through the REST API of Drupal. Could anyone please suggest ...
Banng's user avatar
  • 531
0 votes
1 answer
427 views

I would like to know if it's possible to populate a node fields with the values from form_state or something like that. Basically what I do is to show a register form merged with a form from a ...
mihai's user avatar
  • 43
4 votes
1 answer
525 views

From my module, I'm looking for a way to change text-fields value during rendering process, but WITHOUT creating a new formatter, and BEFORE the currently affected formatter works. In other words I ...
cFreed's user avatar
  • 4,464
0 votes
1 answer
1k views

Based on the "Add-more button (with graceful degradation)" example available in Drupal examples module I have created a form that can add fields dynamically using AJAX, and now i want to add a ...
PIKP's user avatar
  • 843
0 votes
0 answers
152 views

I am using Drupal 7's Form API to develop a prototype for an old system. I've managed to get the dropdown select boxes to load dynamically and dependently from the database. I have also managed to ...
Joel Hughes's user avatar
0 votes
1 answer
99 views

is there a way to have a publish checkbox on a collection field associated to a content type ? if i have 3 items on a collection field associated to a node , one i want to set it unpublished so only ...
Stean K's user avatar
1 vote
1 answer
910 views

Hi I am getting this kind of error in creating custom node type with custom fields: Undefined index: field_block_pre_login_body in locale_field_entity_form_submit() (line 438 of D:\xampp\htdocs\...
Cedric's user avatar
  • 1,256
4 votes
1 answer
6k views

I was wondering how to add a date field type in drupal 7. I was following a video tutorial, when I notice that I dont have a "date" field type in my select options. How will i do that?
user avatar
0 votes
1 answer
78 views

I've been handed a design spec which requires a news listing in a specific format - e.g. image floating to the left, with the main title and content on its right. I've created the articles listing ...
Ambulare's user avatar
  • 944
0 votes
2 answers
5k views

I created a content type with different kinds of fields (text, dates, entity relation...). I have 2 dropdown fields (related to 2 taxonomies). I would like that the second dropdown values change based ...
webpaul's user avatar
  • 156
0 votes
1 answer
152 views

My time field shows after an expired date. My client wants to have the time hidden after the expired date. But still have the date show. Is this possible?
fitnessCraze's user avatar
4 votes
3 answers
542 views

I have created a content type and it has about 5 groups which are all vertical tabs. For some reason the Field group label doesn't work for vertical tabs. the <h2> tag is always: <h2 class="...
Cybercampbell's user avatar
1 vote
1 answer
1k views

I'm using Drupal 7 + Ubercart. Have to add a field with easy selecting from images (52 logo images of producers), that are already uploaded and will be used every time, when i'm adding new product.
bigg_jack's user avatar
0 votes
2 answers
148 views

I'd like to ask a tricky question to you about Drupal. I created a new content type which includes lots of fields. I want to find a module that adds a 'Add another' link to the adding content screen ...
yenerunver's user avatar
1 vote
1 answer
4k views

In mymodule_form_alter() I am programmatically setting states for my conditional fields. I.E. $form['my_field_one']['#states'] = array( 'visible' => array( ':input[...
MTsrb's user avatar
  • 377
0 votes
1 answer
88 views

I have a custom field plugin. It's widget looks somewhat like this: function mymodule_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { ... ...
navij's user avatar
  • 19
1 vote
1 answer
820 views

After creating multiple fields with the help of the installation profile I am now also trying to figure out how I can add the allowed file extensions in the installation profile. Here is my code so ...
mparryy's user avatar
  • 384
0 votes
1 answer
233 views

I'm hoping somebody can help me. I have added nine term reference fields, one for each of my vocabularies, to the Create New User page. What I want is to only allow one term to be selected from all ...
user2615617's user avatar
1 vote
2 answers
790 views

I'm trying to write a conditional statement in a template file to check if the value of a 'node reference' field is not equal to a certain value. This is what I have so far: <?php $value = ( $...
TSDenley's user avatar
1 vote
1 answer
291 views

I am creating a module to alter the output of Drupal 7 text list fields. I know that I can use hook_form_alter to do this, the problem is that the text field is output in different forms in different ...
Leo Pitt's user avatar
1 vote
3 answers
5k views

I need a field which autonumbers my content-type, but starts at some value like 2000. I tried Serial Field and Computed Field. Couldn`t figure out how to do it. The number (using Serial Field) does ...
user1281146's user avatar
0 votes
1 answer
460 views

I have a "movie" content type, on the node for a movie I have a link to create "Movie Review" content. I was wondering if it is possible to pull the title of the "Movie" Node and put it in the Title ...
UpsetPopcorn's user avatar
1 vote
1 answer
199 views

I recently upgraded from Drupal 6 to 7 and on my node pages it is now returning the keys for each selected custom field, instead of the label. This is only happening for "Select list" fields. For ...
Jacobsen.Brady's user avatar
1 vote
1 answer
2k views

What I want to do is trigger an action when one of the fields on my field collection is changed to a certain value. For example, my 'campaign' node has a field collection with a field called 'status' ...
Rich Stevens's user avatar
0 votes
1 answer
58 views

Is it possible in Drupal to find out which user modified a particular field? Not just the whole node. After saving the content I want to display the author name next to that field. Not sure if this ...
Ravi Sagar's user avatar
1 vote
2 answers
281 views

How can I lock the default e-mail field (make it read only), so that users will not be able to change their e-mail addresses after registering. Thanks
Vahan Sargsyan's user avatar
0 votes
2 answers
74 views

There is a node type with hidden fields. Anyone can find nodes of that content type from the search form, and see open information. To see all the fields, users must make a request to the node owner, ...
user2241729's user avatar
1 vote
1 answer
2k views

I have a field collection called field_logo_logos. There are 2 fields within: field_logo_image and field_logo_link In views I can get the data and it comes out like this: <div typeof="" about="/...
Cybercampbell's user avatar
0 votes
1 answer
1k views

With Drupal 7 and Views 3, I'm trying to get the result of a call to views_embed_view with contextual filter arguments in hook_preprocess_node, for embedding into a node template. The view is using ...
AndersDJohnson's user avatar
0 votes
1 answer
1k views

I use drupal 7, and Entity API to develope a module. I have an entity to record client information. I wish to use image_field to let client upload their logo. So I have this function: function ...
Helen Sang's user avatar
0 votes
1 answer
601 views

I am using two select boxes in my form: one for country and one for state. I want the states box to be displayed based on the selection of the country box. I also have two database tables: countries ...
AkiShankar's user avatar
1 vote
1 answer
59 views

my content type, plan to have one or more 'articles'. the following php code, I can get them all: <?php print render($content['field_articolo_di_riferimento']);?> and I get the following ...
Antilope's user avatar
  • 445
1 vote
1 answer
706 views

In Drupal 7, i need to Programmatically create the nodes, by using: $node = new stdClass(); $node->type = "movie"; After, just this codes above, and lets assume i don't know what are the fields ...
夏期劇場's user avatar
  • 18.5k
0 votes
1 answer
166 views

In Drupal 7, i need to Programmatically create the Nodes. As usual, there are Different Fields set for Different Content Types. For very simple example: Content Type: "car" Fields: "Model", "Engine",...
夏期劇場's user avatar
  • 18.5k
2 votes
2 answers
7k views

I am using Drupal 7 and conditional fields. I need to show a select field with values based on the value selected from the first option field. For example, if the first selected option is "Country" ...
user1679530's user avatar