WordPress.org

Ready to get started?Download WordPress

Forums

WP-Ajaxify-Comments
[resolved] Integrate into other forms (3 posts)

  1. sean_b
    Member
    Posted 12 months ago #

    Sorry to post two in quick succession!

    I'd like to integrate this into other forms. I have a custom contact page form that I've written and at the moment it calls itself for validation and redisplays the form with inline error messages if fields have not been completed.

    I'd like to make it consistent with the comments and use this plugin. I can handle putting the right css containers in, I just need to know what the validation code needs to do to trigger the messages.

    http://wordpress.org/plugins/wp-ajaxify-comments/

  2. janjonas
    Member
    Plugin Author

    Posted 12 months ago #

    Hi,

    thanks for your comment. With the current version 0.14.x you can use the JavaScript functions WPAC._ShowMessage as follows:

    WPAC._ShowMessage("Your error message...", "error")
    WPAC._ShowMessage("Your error message...", "success")
    WPAC._ShowMessage("Your error message...", "info")

    to show/open the message popup. Please note that the API WPAC._ShowMessage might change in the future versions.

    Moreover you have to implement the other validation and/or AJAX (JavaScript) functionality. Unfortunately, at the moment there no way to the WP-Ajaxify-Comments' form handling code.

    Hope this helps...

  3. sean_b
    Member
    Posted 12 months ago #

    Thanks for such a quick reply.

    Looks like I've got to do a fair bit more digging to figure out how to get it to submit the form and check the response. I'm OK on PHP and HTML/CSS but not really Javascript. I'll have a look at what the plugin does and see what I can work out.

    I'll mark this as resolved, and perhaps suggest a future feature request to make this applicable to other forms outside of the comments!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.