enter image description here

I need to insert the value as below.. but not working..

$fields['field_clinic_hospital_location_d']['und'][0]['field_telephone_number']['und'][0]['value'] = $telnum;

I am inserting the user registration fileds from external php file. field values inserting successfully in below 1st case, but not working in 2nd case. I picked this below data from the firebug name attribute which the field is <input tag name="field..." attribute.

Case1:- $fields['field_first_name']['und'][0]['value'] = $firstname;
case2:- $fields['field_contact_address']['und'][0]['thoroughfare'] = $contaddr;
  • You could try installing the devel module and using the dpm() function to print the $fields variable for a profile user that already has those values and you can see what the data structure of the field should look like. Also worth making sure the $contaddr actually has data in it. – rooby Jan 21 '14 at 7:33
  • because there is no thoroughfare element in $fields['field_contact_address']['und'][0]. – xurshid29 Jan 21 '14 at 7:54
  • Hi Rooby.. When I clicked on Devel tab of any user profile there are 5 sub tabs (Load, Token, Render). The values are showing fine with array elements for single filed values (Ex: "field_primary_speciality" in the image). If I have field collection items then that is not array expanding completely with those values (Ex: "field_clinic_hospital_location_d" in the image). I have all contact address information in this field. I need to insert values in the filed collection values. Please see the attached image. – J Sinha Jan 21 '14 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.