• Resolved bazchas

    (@bazchas)


    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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter bazchas

    (@bazchas)

    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!

    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.