• Resolved nicheru

    (@nicheru)


    Hi,

    Thank you for the great plugin.

    I am using the form with bootstrap modal and I added a custom callback to redirect to another form(using modal), it is working perfectly.

    But when I load the first form via AJAX and submit it, it does not call the callback function.

    Is there anyway to do this in caldera form?

    Thank you.

    https://www.ads-software.com/plugins/caldera-forms/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Josh Pollock

    (@shelob9)

    This is very hard to debug without the code. I suspect that the issue is that Caldera Forms’ custom callback doesn’t exist in the DOM when the submit action is bound to it, IE it happens before you load via AJAX.

    I’d recommend making your own function. The from has a class corresponding to its ID. So after your form is added — probably on ajaxComplete — you can create your own call back with something like $( document ).on( 'submit', 'cf123456', function(e) { //do stuff });

    Thread Starter nicheru

    (@nicheru)

    Hi Josh,

    The Caldera From ajax is not loaded in the admin-ajax that is why it is not working. I added the script manually in my ajax action.

    Is there anyway that it will load the script in admin-ajax?

    Thank you.

    Thread Starter nicheru

    (@nicheru)

    Hi Josh,

    If I don’t add the script manually the form does not submit via ajax.

    But adding the script manually, on submit it is so slow.

    Do you have any suggestion or any workaround for this?

    Thank you.

    Thread Starter nicheru

    (@nicheru)

    fixed the issue

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Callback issue on Form called via AJAX’ is closed to new replies.