@panbolec
I tried your code but I am still getting backslashes stripped. I am using ACF Pro 5, should this still work?
@busybrian
It works with ACF 4.x. I had no time to test ACF pro 5. My code was really dirty hack (as I mentioned) so I believe it may not work with new version of ACF. Will try to fix it next week or find better (more elegant) solution with new version of ACF.
@busybrian I was having issues with backslashes in any field, it was breaking the serialized data saved to the post_content and then it was unable to load the field at all. I wrote it up in another post and included some code that fixed it for me – I wrote the sample as a standalone class but am including it in my Validated Field plugin (however currently only in the beta version), which should also be forwards compatible if it is fixed in ACF.
Unfortunately if you have already performed the database upgrade for ACF5 then any fields containing backslashes will have already been corrupted…
http://support.advancedcustomfields.com/forums/topic/backslashes-in-field-attributes-breaks-acf5-import-save/
I, too, would like a code field type for textarea that does not strip backslashes.
It’s been a while since I checked in on this issue. I’m now using ACF 5.3.1 (pro). It appears that this issue may have been solved. Does anyone have a word on it?