Search code examples
wordpressadvanced-custom-fields

Insert new line when updating field in ACF


I'm using

update_sub_field( array('subscribers_lists',$field_row,'subscribers'), $current_subscribers );

to update certain custom fields.

Everything works as expected except when $current_subscribers has '\n'or <br> - it won't do a new line as I would expect.

How would I force a new line when adding text to a field using ACF?


Solution

  • Talked with some developers and they said you cannot do this with a normal text field or textarea. You have to use WYSIWYG field instead.