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

learn more… | top users | synonyms (1)

1
vote
0answers
16 views

Arrange formatted fields in Views row using a template

I want to render the rows of my “Recent content” Views page using a template in order to subdivide the rows into multiple divs, freely move around the rendered fields within these divs, and apply ...
0
votes
1answer
30 views

Filter content by own content or admin

So I have an entity reference field on a node, the widget is a select-box. I want so that an user can choose one of their own authored nodes as a reference OR if an admin is logged in, they can ...
0
votes
0answers
17 views

How to create a multifield programmatically without using features

I have a custom module that I am working on that uses a couple of custom content types. I am trying to keep the module as self-contained as possible and thus far I've been able to create my content ...
0
votes
0answers
17 views

Uploaded images deleted on save in Drupal

A certain content-type in my installation does not save images in it's gallery anymore. The image is being uploaded, registered in file_managed with status 0, and stored in sites/default/files. On ...
0
votes
1answer
18 views

Use Plugin Field inside buildForm()

In Drupal 8, I use this code inside my buildForm() method: $form['medias']['file'] = array( '#title' => t('Image'), '#type' => 'managed_file', '#upload_location' => ...
0
votes
1answer
21 views

Running code only once when building a form

I have built a form using the field API. The function hook_field_widget_form gets called for every field. I have a bit of code that populates a select box but it is being called for every field in the ...
0
votes
1answer
26 views

How to programmatically hide field from display?

I want to reproduce programmatically hiding of a field that can be obtain by Manage Display -> Format -> (hidden) URL: admin/config/people/accounts/fields. Field I want to hide is added by OG ...
0
votes
1answer
17 views

how to clean up the markup of output

I'd like to change the output from the field formatter view from the Field API. I'd like a cleaner markup without unnecessary tags. What's the best way to clean up field formatter view output? Many ...
0
votes
0answers
9 views

Create custom rendering of a field for search?

Is there a way to change the appearance of a filed in the search? Using a custom plugin, there is a field that holds an ID linked to a media database. The usual display for this field is getting links ...
0
votes
0answers
15 views

Field groups not showing when nested using field type HTML

I'm using Drupal 7.34, Profile2 module, Field groups 7.x-1.4. When building a form with nested field groups and using the fieldset field type, my form renders properly. When I configure my form like ...
0
votes
2answers
38 views

Make form to show multiple field widgets with predefined values

I have a node form with multivalue field (cardinality unlimited). I need to show user 3 widgets if this field with predefined value (like shown at screenshot). At screenshots I show the current form, ...
0
votes
2answers
24 views

Safety of letting user define javascript paths in fields

I have a module that uses the Fields API to insert a HTML5 canvas element and allows users to define paths to user scripts to be loaded with the page: The scripts are relative to a hard-coded path ...
0
votes
0answers
39 views

Prepopulate field collection programmatically

I have a content type with field collection field (unlimited cardinality). Each collection has image field (required) and long text field. How can I prepopulate node form with multiple collections? I ...
0
votes
1answer
10 views

Add tid or name as a class to each item of a taxonomy term

I'd like to add the term ID or the name of the term as a class to each one of my taxonomy terms on a node page. note that I'm not using views, so I wonder how can I achieve this via template.php or ...
0
votes
0answers
28 views

Update to Drupal Core 7.34 and the Password Fields are missing

Update to Drupal Core 7.34 and the Password fields are missing in the user registration are no longer appearing. Can't understand why. In the code they simply aren't being rendered. site: ...
1
vote
1answer
22 views

How to create widget element with unlimited values?

I have a widget for a field as shown below: I would like to make the text field ('script_paths') an unlimited value so that the user can add as many as they like. Is there a way to do this? Maybe ...
0
votes
0answers
12 views

Product thumbnail in custom block wont generate if on same product page

I have an issue with a custom module I have created to display contents of the cart in a popup. I appear to have it all working apart from the thumbnail image of a line item not generating if viewing ...
0
votes
2answers
45 views

How to create new field type

I'd like to create a new field type that can be attached to content (ie an article) via the admin interface through 'manage fields' of the content type. I am unsure of the process and required hooks ...
0
votes
0answers
7 views

Additional filter for (image)fields to filter node display

I need to display nodes on multiple places. For some fields I have multi values. On every place I'd like to display other values of the field. I'd like to have maybe some checkboxes as filter. For ...
0
votes
0answers
11 views

Search with select filters that use fields on select

I create a e-commerce with products with some custom fields. I need to create a search box with filters to search in these fields or with free keywords. There are a module, spinet or any code to do ...
0
votes
1answer
18 views

Add extra obligatory fields when editing a node as anonymous user

I need a way to either add extra fields or make two fields obligatory when an anonymous user is editing a node. I'll explain: There is a node type in my site that can be freely edited, modifications ...
0
votes
0answers
4 views

get embeded images from text into field

Objective: Extract image (ideally into a new field) from an existing text field in a custom entity with views handler (civicrm view or civicrm_entity). Scenario: HTML fields often has an image or ...
0
votes
1answer
16 views

Manage Display page not displaying anymore

I set (or at least tried to) my user display page (admin/config/people/accounts/display) to use DS 1col on friday and part way through the request my computer crashed out (the server is running on the ...
0
votes
0answers
7 views

how to display delta along with the value of multivalued field?

I have a multivalued field which I am displaying in views. If a node has three values in that field so the view should display the delta also with the value of the field. i-e delta 1 first value ...
0
votes
1answer
35 views

Render multiple values of a field in Drupal 7 [on hold]

I created a custom content type with a field with multiple values which I want to render as follows in my node--custom_content.tpl.php; <div class="CLASS" style="background: url('<?php print ...
1
vote
1answer
38 views

Search only indexing public fields

We have a problem with search only indexing fields that have their "Field visibility and permissions" either set to be "Public" or "Custom" with the anonymous user able to view. Any field that is ...
0
votes
1answer
57 views

Programatically Create Nodes with Body and Custom Fields

I need to write a module that will fetch remote content via an API and store it as nodes. These nodes have custom fields defined within the module. I have already accomplished this by modifying the ...
0
votes
0answers
14 views

How to set cardinality for textfield field in custom form?

I just created a new custom form using hook_forms, I added all my fields, everything looks fine. One of the field is a textfield. I wanted to allow the users to set as many values as they want. I ...
0
votes
1answer
16 views

How to create a custom field with a custom FAPI element?

I am writing a custom field module for phone numbers. The field has 4 different parts: A select element to choose the type of phone number, (phone, fax, toll free, other), A text field for the ...
0
votes
0answers
18 views

How to Get Orgainic group request form to load additional fields

I have created two different types of groups and one of them was made by cloning another. The first group type I created is for starting a grand jury group. The request form includes name, address, ...
0
votes
2answers
20 views

Dynamically filling up fields of a node in Drupal

We have a content type named "Person", which has fields as Full Name, Age, Address etc. There are thousands of people entries on the site. We are using Views to sort out people's list on different ...
0
votes
0answers
11 views

Global: Custom Text suddenly not working

I am currently using the bitnami mamp stack with drupal and lime survey modules. I created a view in which you can click a link to directly take you to the survey to submit an answer. It was working ...
0
votes
0answers
20 views

change node types file fields widgets programatically?

I have installed multi_upload_filefield_widget. I would like to change every file widget of every file type fields of every node type programatically. i would need to automate this change since i ...
0
votes
1answer
28 views

How to add a javascript field to custom content type

I have a custom content type called 'Visualisation'. I would like a user to be able to upload their own javascript file for each instance of the content type. I would then like to load this script on ...
1
vote
1answer
32 views

Added a new field to user profile, how do I set a value for existing users? [duplicate]

I have added a new field to the user profile on my site (i.e. in /admin/config/people/accounts/fields), a boolean value that can be either 0 or 1. Existing users have no value. How can I easily set a ...
0
votes
0answers
13 views

Prefix and suffix to wrap a Eva field?

I have a eva which contains a view in a node. What I want to do is adding prefix and suffix to wrap around the eva field. I tried to do that in hook_node_view(), but the $node does not contain any ...
0
votes
0answers
21 views

7- Field collection fields are not showing in registration profile

I'm trying to create a registration profile using Profile 2, in this profile most of all fields are field collections. The problem is, when I try to create account for this profile, none of them are ...
0
votes
0answers
24 views

scandir error with quote inside $field->original_value

Can you explain why in my views-view-field--path-1.tpl.php this code: $dir="sites/default/files/calibre_server/".$field->original_value; $files=array_diff(scandir($dir), array('..', '.','')); ...
1
vote
1answer
29 views

How do I make block only visible if the 'field_date_value' is in the past?

What code do I use on a D7 website if I want a block only to be visible if the field_date_value of a date node is in the past? On a D6 site, I had this working for all date nodes: $match = FALSE; ...
-1
votes
2answers
37 views

Is there a module provides UI to create field index?

My views are quite slow in some cases, needs create indexes on field tables. Is there a module for that?
1
vote
1answer
26 views

Do I need a custom content type, entity, module or field?

I'm working on a product information manager, and I have a content type of product which needs to reference stock and price levels for each supplier from a different database - these are stored as ...
0
votes
1answer
22 views

Add value to every user in data field

I'd like to do simple thing, but because of drupal serialized data field don't know how to. I'd like to set for every user a variable in "data" field, I do it manually when user edits its profile, ...
0
votes
0answers
16 views

How to add multiple fields in field group module?

I'm using Field group multiple module with drupal 7. I have added my field group, then added all fields as shown in the image bellow: But I didn't find the possibility to add the button "Add another ...
0
votes
1answer
40 views

Drupal 7 - How to loop foreach in multiple value in custom view

I'm customizing a view (in views-view--myview.tpl.php) based on a node which has a field with multiple value (field_galerie_image). I'm trying to list in a foreach loop that particular field, and I ...
0
votes
0answers
17 views

Correct way to extended Field Settings

I'm doing something that works fine but I get the feeling there is a better way. I have managed to extend the field settings in the field's manage page to add two new checkboxes. The checkboxes in ...
0
votes
1answer
12 views

Role to edit user profiels but not administer accounts

As far as i can tell drupal allows me to make a user role able to edit other user profiles(edit the profile fields) only if the role they have includes "Administer users." When this is set a role can ...
0
votes
1answer
26 views

Entity Reference - adding fields to reference?

I'm using taxonomy and nodes to create a tree structure. Inside the taxonomy term I created an Entity Reference (referencing to nodes). I know this looks like the world upside-down, but for this time ...
0
votes
1answer
25 views

Add a signature and date line to node print template?

I am trying to find the cleanest way to create a signature (your written signature, not forum signatures) and date line on printable pages. I would like to do it without actually changing template ...
0
votes
1answer
19 views

preserve format of node body

for output display I used http://foundation.zurb.com/docs/components/accordion.html I have the following code: <section id="main-content"> <dl class="row accordion" data-accordion> ...
0
votes
0answers
16 views

Hide/Show certain fields with rules based on userpoints

Is there a way to show/hide certain fields using rules and only show those fields by spending userpoints?