Having an issue adding section and page breaks to my forms on a client project. Upon clicking the button to add, I get a JS error:
Uncaught SyntaxError: Unexpected token ILLEGAL
The AJAX returns this (multi-line) which leads me to believe this is where the issue is with the JS since there are line breaks in it (there are none of these line breaks in responses from adding other field types:
EndAddField({"id": 33, "label": "Section Break", "adminLabel": "", "type": "section", "isRequired": false, "size": "medium", "errorMessage": "", "inputs": null, "displayOnly": true}, "<li id='field_33' class='selectable gfield gsection' ><div class='gfield_admin_icons'>
<div class='gfield_admin_header_title'>Section Break : Field ID 33</div>
<p><a class='field_delete_icon' id='gfield_delete_33' title='click to delete this field' href='#' onclick='StartDeleteField(this); return false;'>Delete</a><a class='field_duplicate_icon' id='gfield_duplicate_33' title='click to duplicate this field' href='#' onclick='StartDuplicateField(this); return false;'>Duplicate</a><a class='field_edit_icon edit_icon_collapsed' title='click to edit this field'>Edit</a></div>
<h2 class='gsection_title'>Section Break</h2>
<div class='gsection_description'></div>
</li>");
As I tested further, I saw the same issue with adding HTML fields too. Any thoughts on a solution? Using Chrome + latest WP and GF