Fields are custom data that can be attached to Drupal entities.

learn more… | top users | synonyms (1)

1
vote
2answers
17 views

How to send an eMail notification when a specific field of a node or user has been changed?

When a node (or user profile) is modified, is it possible to send an email notification only when a specified field is modified? With the node I have no problem, but I cannot get it to work for a ...
0
votes
0answers
5 views

How to import allowed values lists into Drupal 8?

I have a Drupal 6 site, with some fields that allow you to pick from a list of allowed values. These values are then stored/linked to the node/entity. After migrating from the old site, these values ...
0
votes
0answers
7 views

I am using webform module and facing issue with page breaks [on hold]

I created two pages with some fields in page 1 and page 2. when i fill the data in the page 1 and afterwards if i came back to page 1 from page 2 using previous button on the page the fields data are ...
0
votes
0answers
20 views

Delete field's machine-name in Drupal 7 [duplicate]

I'm trying to create a new field, but Drupal came up with the well-known error: The machine-readable name is already in use. It must be unique I'm sure that the field doesn't exist anymore (I ...
1
vote
0answers
11 views

D8 Use Mongo for custom entity storage

Thanks to Drupal 8 new field storage architecture, we can read everywhere that we can use other database than Sql, for example MongoDb, to store fields data. I have a custom entity with some custom ...
2
votes
1answer
12 views

Delete query is called while updating the value of node

Delete query is called while updating the cck field value of node. After debugging i find following code in var/www/drupal-7.40/modules/field/modules/field_sql_storage/field_sql_storage.module ...
0
votes
1answer
6 views

CCK field migration reproducibly results in server error

I am struggling with a last minute update from D6 to D7, now I am trying to migrate my CCK types to Fields using CCK module in D7, following the documentation. When migrating the most important of my ...
0
votes
1answer
13 views

Override name of file field link in Drupal field.tpl template

I have a file download field in a node. The field displays as a simple link with the name of the file that will be downloaded, eg: picture.png What I want to do is rename the name on the link, i.e. ...
0
votes
0answers
13 views

Drupal 8 - rewrite title field to link to external URL

I have many nodes with titles like "CC 12.138" and I want to link them to an external site with a URL that looks like "site.com/en/cc/12/138". Is there a recommended way to accomplish this, if ...
0
votes
1answer
18 views

Add option values to field that already has data

I created a content type with a field "Category". In that field I added two values: - Books - Movies I inserted data in this content type and I have a view showing the content per category. Now i ...
1
vote
0answers
26 views

How to use a math field to calculate a product of an existing file?

I would like to have a field (field_result) that would display a number that results of the product of an existing field (field_1) on the same content type (let's call it book) and a fixed number ...
1
vote
0answers
13 views

Teaser is missing CKEditor when uncollapsed

I have text with summary fields on my entity and for some reason the ckeditor is present only on the body, not on the teaser if I uncollpse it. What could be the issue?
1
vote
0answers
7 views

Default to “no limit” for maximum number of options in field type select

The number of cities and sectors "small cities" in Moldova is around thousand,so we have already exceeded the arbitrary 100 limit without half-trying. The limit causes problems when we translate the ...
0
votes
1answer
15 views

How do I turn a select list into a radio button?

I have a list text field that I want to display as a series of radio buttons instead of a select (dropdown) list. In Drupal 7, I could change this on Manage fields. How can I do that in Drupal 8?
2
votes
2answers
48 views

It's safe to change INT to BIGINT or DECIMAL in database? [on hold]

I need to change a field from INT to BIGINT or DECIMAL. I tested changing it directly in the database on field_data and field_revision tables and apparently all is working fine, but I have my doubts ...
3
votes
2answers
92 views

Is it a good way to change multiple text fields values via MySQL or is there any other preferable way?

The site has a content type and this content type has two fields: Text Field Term Reference Field There are thousands of nodes on this content type and I want to change some values (find/replace). ...
1
vote
1answer
29 views

Is there any way to add the social medial buttons in the field of Drupal7?

I have made the field using field collection which are collection of 7 fields and the 8th field I would like to add as strip of social media buttons(like easy social module), so when the entire ...
0
votes
0answers
9 views

Is it possible and how to show(render) editable field in views/block/page with submit?

I'm just curious is it possible to put in views or block or preprocess a editable field from user/edit to user/uid (profile) so that the user can edit the field from profile with submit (i know how to ...
0
votes
0answers
21 views

Node reference - Autocomplete - title + fields in the autocomplete HOW TO [duplicate]

2 content types : node type A. node type B. referencing node type A. Most of the type A. nodes share the same title but aren't the same at all. I need to add some fields in the autocomplete ...
0
votes
2answers
27 views

Combine several field as a new field

say my custom content type has 3 different fields: max, min, mean. What I want to achieve is group them into a new field say statistics so the new statistics field will have all the values in fields ...
-1
votes
0answers
12 views

How to add Image in Manage Orders [closed]

I have a module which adds text on the image. Here is link to module http://213.59.235.227/magazz/?q=hats/%D0%BA%D0%B2%D0%B0%D1%80%D1%82%D0%B5%D1%82-1 I want to add customized image in Manage orders ...
0
votes
1answer
27 views

Using Twig how can I get the summary of the body field to use in a template?

So I have a textarea with summary and I want to display the summary before the content. So if I just use {{ content.body }} the text is displayed without the summary. How can I get the summary ? {{ ...
1
vote
1answer
34 views

How can I combine the fields of two field collections in my theme?

Update: I really appreciate @NoSssweat's answer, but it isn't what I'm looking for in this case, so I'm still looking for an answer. Please help me better understand how to crawl through and combine ...
1
vote
1answer
13 views

create a custom field which is allowing multiple values using custom module

I created custom content type and one custom field(text) successfully. But my requirement is, my custom field should allow to add multiple values. Could you please help me... Thanks In Advance
0
votes
1answer
13 views

change field value in a view using preprocess_views_view_fields

I'm trying to change the value of a field in a view programatically but i find some problems. first is that even though I created a Global: custom text field which field id is 'nothing', It's ...
0
votes
0answers
12 views

How to add two values together when storing in an array [closed]

I have a database field and want to populate it by adding 2 values together. But it isn't working with this syntax $sql = array( 'field1' => $var['value1'], 'field2' => ...
1
vote
1answer
24 views

What are the pros/cons/alternatives to creating a number of identical content types to allow for divergence?

I hope this counts as an answerable question. A publications database I'm migrating from another content management system to drupal, has different types of publications. In the current system those ...
1
vote
0answers
13 views

how to create a views from newly added field

I use this code to add a field to comment's table. function cmnt_install() { $field = array( 'type' => 'int', 'not null' => TRUE, 'default' => '0', 'description' ...
3
votes
1answer
22 views

Why can't I add an existing field to the user accounts on Drupal 8?

On Drupal 7, you can add fields that have been added to nodes to user accounts. At admin/config/people/accounts/fields, scroll down to Add related fields and simply select the field, easy. But in ...
0
votes
2answers
28 views

How to do some calculations using fields within a Field Collection field?

I have a Field Collection field and I'm trying to do the following: Multiply the value in one field with the value in another field and have the result shown within a third field. I have tried ...
0
votes
0answers
9 views

change field value shown in a view based on contextal filters

I've got a view of products (houses for booking) where one of the fields is price / night. When an availability search is done, the view applies a contextual filter and only show the available items. ...
1
vote
1answer
26 views

How do I change the date format depending on Start and End date in Drupal 7

I have a content type called 'Events' including the fields: Title Thumbnail Date (Can be a start, or both a start and end date) I have created a view that takes this content type and outputs it ...
0
votes
1answer
23 views

Is there a module/hook for permissions for list values?

Say I have a text list field attached to a node with the following values: Apples Oranges Grapes Kiwi Strawberries Pears Bananas But I want to give some options only to some roles, for example: ...
0
votes
1answer
13 views

Can I remove the “summary” from the “Text (formatted, long, with summary)” widget?

When creating a new content type, by default it has the Body field, which has a Field type of Text (formatted, long, with summary). For this content type, I don't want authenticated users to see the ...
0
votes
2answers
14 views

Fields attached to Workflows do not get saved

Using Drupal 7.41 and workflow 7.x-2.8, when you attach fields to a Workflow, the fields do not get saved with the workflow field. It's easy to replicate: Create a workflow, add a field to that ...
0
votes
1answer
15 views

How can I add a new value to a multi-value field programmatically?

I have a multi-value textfield that stores the user agent string. I want to store the user agent every time the user logs in (this may not in fact be a good idea, but for sake of example). The ...
4
votes
2answers
36 views

Drupal dynamically create fields based on integer value

I have a requirement that I need to dynamically create x number of fields based on a supplied int value from a text box. Example: There is a software content type. A user goes to add a new piece of ...
1
vote
1answer
30 views

Where can I find the link between field answers and the user who submitted it?

Noob here. I can't figure out how entity forms stores which user submitted each answer for it's fields on the database. All I can see is a table for each field, and the columns within being: ...
0
votes
1answer
33 views

Creating a filter programatically with views_get_view [duplicate]

I have a lot of views and I want to add a filter to just one of them. This view is called soccer_news_feed and I want it to check out my custom field: field_data_field_is_score and display if it's not ...
0
votes
0answers
13 views

Commerce Coupon block entry to the review page during order process

I just install Commerce Coupon Module 7.x-2.0-rc2 and required dependencies (discount module, inline conditions). After that I create discount and applied a coupon to it, I also add right permissions ...
1
vote
1answer
38 views

Can I reference field item & label in node.html.twig?

In Drupal 8, I defined a content type (say example) and made a separate template for it: node--example.html.twig. I wonder if I can reference the item or label of a specify field in ...
0
votes
2answers
18 views

Does having too many cck fields negatively affect site speed and performance?

I building a site that could potentially utilize 50 different content types. The most of the content types have more than 40 CCK fields, including multiple field_collections entity_reference. How can ...
0
votes
2answers
20 views

What do the js-text-full and text-full in the StringTextAreaWidget class do?

I am planning to create a field type to use as hidden captcha: a field that is hidden to users using a browser with enabled CSS, used to verify if the user registration is not done by a human being. I ...
0
votes
1answer
46 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
0answers
22 views

how to alter form field's label to fit bootstrap inline display

i had a long form "enroll" with many field, need all label display inline. i am not using bootstrap theme, but i added bootstrap css and js file. so now i just need alter field output as same as ...
0
votes
2answers
42 views

Programatically render field in specific language while leveraging core content language detection

I'm working on a contrib module port to D8 and can't seem to find appropriate Entity API documentation to figure out how to get a rendered field in a specific language. I have a controller that needs ...
0
votes
0answers
16 views

How can I add a new field to a node with a preprocess function?

I know that I can make new variables available in my node.tpl.php files by using preprocess functions, and I know that I can theme specific fields in a node by using field.tpl.php files. But how do I ...
0
votes
0answers
21 views

How to get the last updated time stamp of a field in field collection

How to get the last updated time stamp of a field in field collection.Is there any drupal built in function to get the timestamp
0
votes
1answer
37 views

How do I implement Entity Reference Behaviour Plugins?

Do Entity Reference behaviour plugins exist for Drupal 8? Please see: https://www.drupal.org/node/1803064#comment-10717088 Are there any existing examples; documentation or code? I would like to ...
1
vote
2answers
40 views

How can I add extra information for each term reference?

I'm trying to create a content type that matches a product. The product can be made of several thing in different percentages: Eg. material 1: material 1.1: 5% material 1.2: 0% material ...