I have a custom field with data type 'Note' and field type 'TextArea'. When I insert a value using the CiviCRM interface, I can insert text via an editor, and bold text gets displayed as bold, italic etc.
Now I want to put html in this same field using the API, but the problem is that any html characters are converted to html entities when inserted.
$params = array(
'contact_id' => $contact_id,
'entity_id' => $contact_id,
'custom_' . $content_field_id => '<div class="note_content">' . implode('</div><div class="note_content">', $data['note_content']) . '</div>',
);
$create_note_result = $spcivi->api('CustomValue', 'create', $params);
html send via api:
<div class="note_content"><strong>Vette</strong> tekst is toegestaan!</div><div class="note_content"><em>Shuine</em> ook!</div>
result content in field:
<div class="note_content"><strong>Vette</strong> tekst is toegestaan!</div><div class="note_content"><em>Shuine</em> ook!</div>
Is there a way to insert html without the html characters being converted to html entities? Using the field type TextArea becomes quite useless when not html can be inserted.