-1

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

closed as too broad by Bala, Krishna Mohan, Mołot, kiamlaluno Nov 17 '14 at 12:55

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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. – kiamlaluno 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

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