Active
Project:
Multifield
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2016 at 17:36 UTC
Updated:
4 Dec 2021 at 11:12 UTC
Jump to comment: Most recent
Hi, Im trying to access to a subfield called 'field_hello' inside of a field called 'field_imputaciones' can anyone tell me please how to get thouse values?
Thanks in advance!
This will be the normal code if the field were not a subfield.
$field_items = field_get_items($entity_type, $entity, $field['field_hello']);
$total = 0;
foreach ($field_items as $item) {
$total += $item['value'];
}
$field_b = field_get_items($entity_type, $entity, "field_pagado_alqu");
$entity_field[0]["value"] = $field_b[0]["value"] + $total;
Comments
Comment #2
Diseño web MallorcaComment #3
Diseño web Mallorca