WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [plugin MM Forms] [0.9.6b Bug Fix] Forms Hang After Error (5 posts)

  1. Akarin
    Member
    Posted 4 years ago #

    Symptom:
    When filling out a validated form, the form successfully submits. However if a field error is thrown and then corrected, the form seems to hang with the spinning ajax gif by the Submit button.

    Cause:
    After a Submit, JavaScript function mmfProcessJson is called in mm-forms.js on line 56. On error the Captcha is regenerated and it's coded value re-inserted in the form. However upon value re-insertion, the coded Captacha value overwrites ALL hidden form values such as id, causing future validation attempts in the mm-forms.php, ajax_json_echo() to fail with an invalid array index. Thus causing the hang since there is also no error handling in this function for this case.

    Solution:
    Since JQuery 1.2, the "@" sign was depreciated as part of the Selector Attribute Filter syntax(see API). Which is why ALL hidden form values were replaced with the Captcha value instead of the specific one indicated by the attribute filter.

    Simply replace mm-forms.js, line 70
    jQuery(data.into).find('input:hidden[@name="_mmf_captcha_challenge_' + i + '"]').attr('value', match[1]);
    with
    jQuery(data.into).find(':hidden[name="_mmf_captcha_challenge_' + i + '"]').attr('value', match[1]);`

    http://wordpress.org/extend/plugins/mm-forms/

  2. Akarin
    Member
    Posted 4 years ago #

    Although it doesn't affect the form behavior, two lines up you should also change
    jQuery(data.into).find(':input[@name="' + i + '"]').clearFields();
    to
    jQuery(data.into).find(':input[name="' + i + '"]').clearFields();

    PS - MM Forms 0.9.6b ships with JQuery 1.3.2

  3. richoid
    Member
    Posted 4 years ago #

    I did the above, but still getting the 'hang'. Any suggestions?
    URL of the form in question: http://danabruce.com/contact/

  4. richoid
    Member
    Posted 3 years ago #

    Followup: I've been contacted a couple times by people asking how I resolved this problem. I didn't. Here's the full story, on my blog.

  5. ScorpioRose
    Member
    Posted 3 years ago #

    HELP!!!!!I have orders placed via MM forms on my blog, but when I view them to read and complete the order, the values are coming through as non-deciperable garbled, gibberish. I tried exporting and downloading them and the same gibberish appears. I am currently using Windows XP, WordPress 2.8.6, and MM forms plugin Version 0.9.6b Can anyone give me some immediate advice on how I can resolve this issue? I would so appreciate it!
    Thank you!

    luminscorpiorose@aol.com

Topic Closed

This topic has been closed to new replies.

About this Topic