{"type":"video","version":"1.0","html":"<iframe src=\"https://www.loom.com/embed/e3e81bfcf7654e15b5b6f5d3053808f5\" frameborder=\"0\" width=\"1280\" height=\"960\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>","height":960,"width":1280,"provider_name":"Loom","provider_url":"https://www.loom.com","thumbnail_height":960,"thumbnail_width":1280,"thumbnail_url":"https://cdn.loom.com/sessions/thumbnails/e3e81bfcf7654e15b5b6f5d3053808f5-00001.gif","duration":383,"title":"Emails - runaway peacock - 18 May 2022","description":"**ADD TO GRAVITY FORM**\nHere is the HTML added  at the top of the form:\n Select all Emails\n\nHere is the sctipt used in the Jquery HTML Block:\n\njQuery(function ($) {\n    jQuery(\"#selectall\").click(function() {\n        jQuery(\".check_email\").prop(\"checked\", this.checked);\n    });\n    jQuery(\".selectedId\").change(function() {\n        var check = jQuery(\".check_email\").filter(\":checked\").length == jQuery(\".check_email\").length; \n        jQuery(\"#selectall\").prop(\"checked\", check);\n    });\n jQuery('input[type=checkbox]').change(function() {\n   // jQuery(\".copy_emails\").click(function() {\n        var email_array = new Array();\n        jQuery(\"input[name='emails']:checked\").each(function() {\n            email_array.push(jQuery(this).val());\n        });\n \n        var emails = email_array;\n        var unique_emails = [];\n        jQuery.each(emails, function(i, el){\n            if(jQuery.inArray(el, unique_emails) === -1) unique_emails.push(el);\n        });\n        var text = jQuery('#input_7_1');//Change '7' to your form ID and '1' to the field ID that will hold the array of emails\n        text.val(unique_emails);  \n    });\n});\n\n\n***ADD TO GRAVITYVIEW CUSTOM CONTENT FIELD***\n {email:3} // replace'{email:3} with the merge tag of your email field"}