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

learn more… | top users | synonyms (1)

0
votes
0answers
6 views

Create a names and email field on comments in D6

I am trying to add extra fields onto the comments box in d6. Have tried this in my template.php file function mythemename_form_alter(&$form, &$form_state, $form_id) { if ($form_id == ...
2
votes
1answer
11 views

Views: how to remove enting zeros from decimal field

Suppose, we have a view with a decimal field: It is output like this: 5 000.000 Is it possible to remove the ending zeros, so it looked like this: 5 000 But if there are meaningful values in ...
0
votes
1answer
10 views

Hide fields on content creation

I have added my own content type with many fields to enter, I want to hide some fields when adding a content according to radio button selection. I explain, in the add content page, i have two radio ...
0
votes
0answers
5 views

Editable fields save all instead of onchange update?

I have a panel with a view that contains a table of data. With the editable fields I can edit these values. The problem is, that everytime I change such a field it is firing an ajax call to update the ...
2
votes
1answer
22 views

3-rd decimal digit has disappeared in the output

I created a field, attached it to the entity: coefficient_to_second_side. Type in the database is decimal(10,3). Then I added a value: 1.001. When I select this field manually from the database, the ...
0
votes
0answers
8 views

theming user profile with “User Field Privacy” - but no “Privacy” available

My setup is like this: multiple additional user fields (not using profile2) and the module "User Field Privacy" is enabled. I am currently theming user profile pages through a preprocess function and ...
0
votes
2answers
24 views

Is it possible to divide a field into fields?

I think this is impossible. However, is it possible to change a field into fields on Drupal 7? I have a content type of author. We used the "Title" field for user full name with their title. Is it ...
0
votes
3answers
29 views

Show a default value when user doesn't fill in a field

I would like to show a default value if the user doesn't fill in a field in the user profile. For example: I have a Hair type field. If the user fills it in, i would like the following output: ...
0
votes
0answers
9 views

Poll field options getting duplicated

I am using a Poll Content type. I am using a client/Server architecture where i am importing content from the server side using Services module. During first import i am able to get the node values ...
-1
votes
0answers
14 views

Is it working if i place field.tpl.php file inside module folder?

When i place custom field.tpl.php file in theme folder it's working fine. I just wants to put my custom field.tpl.php file inside custom module folder. which is created by using ...
0
votes
1answer
10 views

How to remove width and height from image field images in Views?

I'm using Views to generate some HTML, and this includes a field from a Views field. My problem is, the layout needs the images to be reponsive (height and width based on the parent element), but ...
0
votes
0answers
24 views

how to request multiple public image sizes from a field's filename?

my json Service returns... field_photo: { und: [ { fid: "810", uid: "1", filename: "dxb-airport_1.jpg", uri: "public://dxb-airport_1.jpg", filemime: "image/jpeg", filesize: "64389", status: "1", ...
1
vote
0answers
16 views

Injecting field data in a custom entity

I have created a custom fieldable entity. Now I want to inject the field data into the entity and render the complete entity with the fields. The following code is working for text fields and ...
0
votes
0answers
16 views

Allow timestamp published/updated dates for certains fields?

Is there a module to enable or disable the created and updated dates to certain fields? The goal is to have a timestamp of the date of creation/modification date of a field (of type text) has ...
0
votes
1answer
20 views

Migrating a field collection with a field that has multiple values

I have a field collection migration that is taking nodes of type Map List from a D6 site which have two fields, a title, and a node reference to entity of type Venue. There anywhere between 1-10 node ...
0
votes
0answers
11 views

Trouble with module “node compare”

I have installed the module node compare. You can compare fields of every node type with this module. I selected about 19 fields to the comparison table but only twelve appear. I posted an issue but ...
0
votes
0answers
24 views

Hiding Time Field if Date is Expired

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?
0
votes
2answers
29 views

Views fields configuration is not working

I set a few fields as FIELDS section of a view. the problem is when I click on the fields the Style settings ,No results behavior , Rewrite results and More links are not collapsible . this is the ...
1
vote
1answer
22 views

Issues with the entity field output

Suppose, we have an entity "song", that has a required field, called "authors": In the list of songs in the admin panel I want to output the list of all the authors in the search block: //search ...
1
vote
2answers
23 views

How can I hide the label saying “URL*” from content creation form when using the link module?

I'm using the link module to ask the user for a link. I have disabled the link text (I.E> the text that would be inside the anchor tag) so the user wouldn't be asked for a title. What I would expect ...
0
votes
0answers
12 views

How can I make CCK field labels display differently on the node display page as opposed to the node add page?

I have a custom content type with form labels like this: "Would you like to upload photos?" That's appropriate for uploading data, but when displaying data to the world I'd just rather have: ...
0
votes
0answers
21 views

Bean bundle type

I want to use hook_field_enable() to enable required fields when I enable my bean. In order to do so I need to know the bundle type in order to create the instance $instance = array( ...
0
votes
1answer
30 views

Schema.org itemprop=“url” inside anchor object (link)

I'm trying to use the preprocess function to change the default outpot of links <a href> to include Schema.org's itemprop="url" inside the anchor object, as well as adding a <span ...
0
votes
1answer
51 views

How to add another field collection instances on Add Form page load programatically

I have one field collection with unlimited values in Commerce Product Add form. After performing some action, When user redirects to Add Product form, based on some predefined values in session, I ...
0
votes
0answers
10 views

Can't get hook_field_attach_view_alter to set the value of the field

I'm using some hook code I got from Drupal 7 show empty fields in order to show all of the empty fields on my node when viewing it. I would like to put a simple - as the displayed value when the field ...
0
votes
1answer
25 views

drupal identify which content type is not used

I have a drupal existing project which is slow in performance and many irrelavent extra stuff. what aprroach is best where i can identify that which content type is used or not . Or we can say that ...
0
votes
0answers
15 views

Change taxonomy term field into text field in content-type

Is there a way to transform a taxonomy term field into a simple text field? I need to keep all the terms present in the taxonomy field and have them separated by a comma.
0
votes
2answers
44 views

How do I preprocess “extra fields”?

Drupal allows you to create "extra fields" through hook_field_extra-fields. I'd like to be able to load javascript (among other things) in my module, based on the presence of one of these fields, but ...
-1
votes
0answers
13 views

How model/tag URLs to company “division” field

I am trying to model a content type of companies. Each company can have multiple tags such as "Technology", "Financial services", or "Biotechnology", or "Consulting". I also have a set of URLs ...
0
votes
2answers
21 views

Unable to set date field programmatically

Somehow my custom fields ('datum' and 'high') are not set in the following script. Could someone tell me what I am doing wrong? function erstelle_kursenodes() { $content = ...
0
votes
0answers
15 views

Make summary use consistent markup on WYSIWYG text field

My body field is 'long text and summary', and on teaser display I'm using 'summary or trimmed'. Because CKEditor is enabled on this field (using WYSIWYG module), the body field outputs wrapped in ...
0
votes
2answers
50 views

How can I create a new field with a line break in it?

I created a few fields which always stick together with no free space at all. Then I created a new field between them which I named linebrake, chose the "long text and summary" (which is the only type ...
0
votes
1answer
22 views

Multiple filed handlers in Views for a field [duplicate]

How do I set multiple field handlers in Views on a single field. I've applied the patch Relationship & sort for {history} to Views which brings in the user relationship on the history table. I ...
0
votes
0answers
14 views

On a field of type “link”, how can you set the default link to a query parameter

As I understand, you can set the default field value in drupal to a parameter from the query string. To get the value from the query parameter "foo" http://mysite.com/node/add/link/?foo=bar In 7.x-3 ...
0
votes
0answers
12 views

Creating a rule for a button press on a view

Apologies for the phrasing of the title. This is quite a complex issue, an I'm getting quite frustrated with this. I've got a website that sorts websites in order of ranks (based on the number of ...
1
vote
2answers
27 views

Change a long text field to text

I'm trying to convert a long-text field into a text-field. The only thing I found so far is the "field_config" table in the database. But any change there is only leading to errors. Do I have to ...
0
votes
1answer
28 views

Check if field has value (content)

I have code which checks if field exists, but I try to change it to check if field has value (content) or not. In views I have one field to show all content (Rewrite results). So all fields are ...
0
votes
1answer
34 views

Creating a Custom Field Type for Fieldable Entities

Problem My custom field type will not save data. Every time I save the entity it is attached to (it doesn't matter what entity I do this on) the value always comes out NULL and SQL throws an error ...
0
votes
0answers
24 views

Dynamic data forms and reports from non-Drupal databases

I have the task of displaying non-Drupal data which is stored in SQL Server within Drupal. I need to display search pages (ad-hoc style) and results based on page and field definitions stored in a SQL ...
0
votes
1answer
26 views

Drupal 7 Views Image Field Default Image Not Displaying

I am trying to make a view using fields to display a default image that I set in Manage Fields of the Content Type. Is there any way to do this or do I have to hack views or maybe just some workaround ...
0
votes
1answer
14 views

How to add value in to multiple value field (entity reference)?

Im inserting into user field reference to other users. This is my code, but it is overiding all values of field, i just want too add value and keep values added before. <?php global $user; ...
0
votes
0answers
7 views

Term description and field_attach_update()

When I programmaticaly change term fields and term description, I can save changes by calling taxonomy_term_save($term); But if I don't want to save the term itself, only changed fields, I want to ...
0
votes
1answer
19 views

Automatically show one selection of a field based on the selection of another field in a view

Sorry if this is a repeat question but I'm stuck! Ok, I have a content type named 'Media' that is basically a bunch of videos, pictures, podcasts as well as a small write up that explains what it is. ...
0
votes
1answer
22 views

How to display or hide a Views field based on it's length?

I have 2 fields in Views the first of which is always displayed, and the second I would like to display only if the first field has more than 70 characters. I have tried to do this using Views ...
0
votes
0answers
19 views

Is it possible to insert value in field using rules?

How can I insert data in database using rules, I created entity type job and added some fields. I want to insert values inside those field when the flag button is clicked. I tried "set a data value" ...
0
votes
0answers
6 views

Compound Field. Allow validation only on content edit

I have created a compound field following a tutorial in a book. I have also implemented validation which is working fine. I have also managed to only call the validation when content which uses this ...
0
votes
0answers
12 views

Features auto delete field

I've been using Feature to provision changes between my DEV, STAGING and LIVE sites. What I'm finding is when I make a field redundant on a node type on my DEV site, features does not automatically ...
0
votes
1answer
20 views

When Num of Values is “Unlimited”, create begins with two instances

I've created a custom module for a field in drupal that has two fields, Position and Affiliation. I add the field to my test content, and set Num of Values to "Unlimited". The Problem: When I go to ...
0
votes
1answer
25 views

How do I render multiple form fields select boxes in a single row

I am trying to render three dropdown boxes to be on the same line using a tpl file. Here is the snippit of code I am trying to work with: $form_stuff = array(); $form_stuff[]=$form['field_list_1']; ...
0
votes
2answers
31 views

Boolean single on/off field - how to make it NOT render the off option?

I'm having some issues with boolean field. I want to have few fields that can be turned on/off, which will be used to show if something is available in the content. So I thought single on/off ...