-1

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

2
  • 1
    Enough: $wrapper->body->set(array('value' => "<b>The second body.</b>"));
    – Nikit
    Nov 16 '14 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
    Nov 16 '14 at 6:29
2

No.

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

0

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