Results 1 to 3 of 3

Thread: [formcheck] [ajaxform] Intercompatibility

  1. #1
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default [formcheck] [ajaxform] Intercompatibility

    On my one website that I've developing, I've been able to get both working together, but now on my other website I'm developing, it's not working together.

    What I want it for form check to work first, and when i press "send" for the contact form, it shows the little error box above the field, however it submits the form. I want it to prevent submission. I think this is just an order, but since I can't directly control the order, I'll have to do something else.

    ajaxform intercepts the "submit" event, but formcheck also does this, but inside a Class.

    I'm pretty much going blank at this point. Anyone wants to help with this?

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: [formcheck] [ajaxform] Intercompatibility

    I found a way to make them work together, but then some forms don't validate correctly anyway, especially multiple checkboxes, which the formcheck extension doesn't recognize and forces you to check the first in a group of checkbox items.

    If anyone wants to know how to make these two work:

    edit the formcheck.js script: (you also have to modify the moo_formcheck template) to point to the editable script (instead of the formcheck-yui.js file)

    In the initialize function, you just have to add a
    this.form.removeEvents(); just before the
    this.form.addEvent('submit).... existing statement.

    That will delete the ajaxform submit event and only the formcheck will run.

    Then you can add a $('f12').submit(); to the onValidateSucess function parameter, where f12 would be the form ID.

  3. #3
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: [formcheck] [ajaxform] Intercompatibility

    I've stopped hacking and now I'm just using a bug-fixed ajaxform only. It can cope with conditional forms, so it's a better solution. the ajaxform is sexy anyway, so no real need for JS checking.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •