• Hi, how big job it would be to change the predictionform behavior to ajax based so that the page would not reload after every save button click. I know how to prevent form sending as default but need hint, how to send data to the update function.

    This would be a great option from graphical point of view, esspecially when I’m planning to use multiple shortcodes on same page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author AntoineH

    (@antoineh)

    Not sure how much work it is, but it sounds fairly simple as it would be a matter of posting all form values to an AJAX handler. The AJAX handler should call the prediction_form_update() method of the Football_Pool_Pool class and then return a message for the user.

    Simplest approach would be to use the save button to start the AJAX save, but you could also consider saving on change of the input fields. Although, that may require some more work as my code will only save a match when both scores for the match are valid.

    Thread Starter marzoolio

    (@marzoolio)

    Yep, that was easier than I first thought. Thanks anyway.

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

The topic ‘Predictionform trough AJAX’ is closed to new replies.