Do I have to provide both 'value' & 'safe_value'?

  • 1
    Enough: $wrapper->body->set(array('value' => "<b>The second body.</b>"));
    – Nikit
    Commented Nov 16, 2014 at 1:14
  • Welcome to Drupal Answers! Did you try setting just value and see what happens? If you have specific doubts, you should ask about them.
    – apaderno
    Commented Nov 16, 2014 at 6:29

1 Answer 1



If you are adding field programmatically you only need to set value.

The safe value is generated when the field is loaded. It is the value passed through the function _text_sanitize() which in this case i think is called through text_field_load()

More information on the difference between them here :

Differences between value and safe_value


Not the answer you're looking for? Browse other questions tagged or ask your own question.