Drupal 7: How to get this value with PHP

243 views Asked by At

Please see the attached image below. I need to get the highlighted value via PHP and put it into one of my templates. I'm not exactly sure how this works, but this text is created as part of an entityform .

Drupal Themer Info

1

There are 1 answers

0
Muhammad Reda On

You need to implement hook_form_alter in order to access a form element. Kindly read the documentation about how to use it.

Then, you can access the field like that:

$value = $form[YOUR_FIELD]['#items'][0]['value'];

Hope this works... Muhammad.