Title: Modify ProForm jQuery Setup function.
Last modified: August 21, 2016

---

# Modify ProForm jQuery Setup function.

 *  Resolved [bazchas](https://wordpress.org/support/users/bazchas/)
 * (@bazchas)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/modify-proform-jquery-setup-function/)
 * Hi Guys,
 * I’ve encountered an issue surrounding the jQuery that sets up the pro form for
   use when the page loads. I have built a page that loads multiple pro forms depending
   on user selection. These forms are opened as modals on a button click.
 * The issue I have is that as the setup function is an anonymous function attached
   to the document ready event it fires before I have generated the forms. Meaning
   that they appear as just the default html unless I run the function.
 * To achieve this I have modified the authnet.js file in s2member-pro/includes/
   separates/gateways/authnet to place the setup code in a named function and then
   attached that function to the S2p-form ready function. This works fine, however
   obviously is going to break as soon as there is a plugin update.
 * Therefore my question is two-fold. Firstly, is there any possibility this could
   be worked into the plugin so that the setup function can be called at will or
   attached to the form ready as I have done. If not, is there any hook or filter
   I could use to do this on the fly so that my code doesn’t break with an update.
 * Any assistance would be very much appreciated.
    Many Thanks.
 * [https://wordpress.org/plugins/s2member/](https://wordpress.org/plugins/s2member/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [bazchas](https://wordpress.org/support/users/bazchas/)
 * (@bazchas)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/modify-proform-jquery-setup-function/#post-5038642)
 * I’m now closing this as resolved.
 * For any that are interested I managed to achieve it without modifying the core
   plugin code by using jQuery to remove the script from the page on document ready
   and the reinject it after the modal is populated with the form.
 * Works a charm now!
 *  [Cristián Lávaque](https://wordpress.org/support/users/anguz/)
 * (@anguz)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/modify-proform-jquery-setup-function/#post-5038704)
 * Great! Thanks for the update. I’m glad you sorted it out.
 * By the way, s2Member pro-forms have the “checkout options”. See: WP Admin -> 
   s2Member -> [gateway] Pro-Form -> Checkout Options
 * I hope that helps. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Modify ProForm jQuery Setup function.’ is closed to new replies.

 * ![](https://ps.w.org/s2member/assets/icon-256x256.png?rev=980067)
 * [s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions](https://wordpress.org/plugins/s2member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/s2member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/s2member/)
 * [Active Topics](https://wordpress.org/support/plugin/s2member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/s2member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/s2member/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Cristián Lávaque](https://wordpress.org/support/users/anguz/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/modify-proform-jquery-setup-function/#post-5038704)
 * Status: resolved