Advertisement
vyoumans

Untitled

Apr 27th, 2014
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. DRUPAL 7
  2. I have two content Types... BINS and LOGS.
  3. A BIN has MANY LOGS.
  4. LOG has a text field called BINID. Example ("PF1022").
  5. If you goto /bin/pf1022, then you will goto the BIN page.
  6.  
  7. FYI... I am submitting the LOGS from an ANDROID application over services 3.3.
  8. So I want to create a custom field in LOG that is = "/bin/" + [BINID]
  9.  
  10.  
  11.  
  12. TO do this, I was thinking of using the COMPUTED FIELD, so I could store this value in the DB and use it with views... or do it dynamic.
  13.  
  14. In the Computed Code (PHP) section of the field...
  15. $entity_field[0]['value'] = print_r ($entity); will give me this...
  16. [field_bin_id] => Array ( [und] => Array ( [0] => Array ( [value] => PF222 [format] => [safe_value] => PF222 ) ) )
  17.  
  18. This does not work...
  19. //$entity_field[0]['value'] =$entity_field["field_bin_id"]["0"]["value"];
  20.  
  21. HOW can I output something like this...
  22. "/bin/PF1022"?
  23.  
  24. and as an HTML link?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement