i have a problem about get the entity_id in my customfield.module

i know how to get the [width] field value in my program by using the code $item['width'],

but are there any function that i can use to get the entity-id and entity-type='node'?

another question: when i initial a form in my customfield.module,the same problem ,are there

any method that i can use to get the current entity id ?

Thx a lot ~

  • Could you be a bit more specific...where is your form being displayed (block, page callback, etc)? Where is the contextual entity coming from? What method will you use to determine the type of that entity? – Clive May 25 '12 at 8:39
  • Thx f6r answering my question,I just want to get all the fields value in a content type. For example, i have a content type named "test" which has three fields: title,body,custom field. And i want to show the node title and the node id of the article in my custom field formatter.how can i write the program? – cobenash May 25 '12 at 15:50

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.