# Multipage form has inline javascript on buttons - conflicting with CSP policy: "Refused to execute inline event handler"

**URL:** <https://community.gravityforms.com/t/multipage-form-has-inline-javascript-on-buttons-conflicting-with-csp-policy-refused-to-execute-inline-event-handler/14467>\
**Category:** Get Help\
**Tags:** csp, multi-page\
**Created:** [February 16, 2023, 11:34am UTC](https://community.gravityforms.com/t/multipage-form-has-inline-javascript-on-buttons-conflicting-with-csp-policy-refused-to-execute-inline-event-handler/14467 "2023-02-16T11:34:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![user5b3deb0e9cd146.3](https://avatars.discourse-cdn.com/v4/letter/u/ce73a5/32.png) [@user5b3deb0e9cd146.3](https://community.gravityforms.com/u/user5b3deb0e9cd146.3)\
**Post date:** [February 16, 2023, 11:34am UTC](https://community.gravityforms.com/t/multipage-form-has-inline-javascript-on-buttons-conflicting-with-csp-policy-refused-to-execute-inline-event-handler/14467/1 "2023-02-16T11:34:46Z")

</div>

Hi, using multipage forms.  
“Next”/ “Previous” buttons have inline JS handlers.  
i.e  
`onclick="jQuery("#gform_target_page_number_xx").val("2"); jQuery("#gform_xx").trigger("submit",[true]); "`

I have a CSP policy restricting running inline scripts.  
this means the inline scripts are blocked.

How can this be bypassed ? this code needs to be wrapped in tag with a nonce attribute, or placed in an external JS file.  
any suggestions ?  
Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [March 18, 2023, 11:35am UTC](https://community.gravityforms.com/t/multipage-form-has-inline-javascript-on-buttons-conflicting-with-csp-policy-refused-to-execute-inline-event-handler/14467/2 "2023-03-18T11:35:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
