Custom Fields
Re-Envisioned
Support General Use fields outside of metabox and load via ajax

  • Creator
    Topic
  • #19073
    Resolved Joe Anderson
    Participant

    I’m working on a plugin in which I’m using MetaBox. as the core for custom fields. I’m trying to load the fields via ajax and I do not need to use the default metabox save functionality. I just need to display the fields that I have setup using the normal MetaBox array structure and have the fields utilize the associated javascript functionality (for those that need it).

    I’ve figured something out that works decently, but am struggling to get the wysiwyg editor working, along with some other things. I realize that this may be out of the scape of what MetaBox is meant to do, but I was wondering if you had any advice on how to utilize field display and functionality that loaded into a custom container through ajax?

    Is there something in the Frontend extension that I should be looking at?

    Thanks for any help on this!

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #19097
    Long Nguyen
    Moderator

    Hi,

    Only the extension MB Frontend Submission supports to show the fields in the front end. If you just want to display the fields, please use the shortcode of this extension to show the fields in a form, then you can use the Javascript code to pause the action form submit and do your stuff after.

    Example

    jQuery(document).ready(function($) {
        $('.rwmb-form-submit button').on('click', function(e) {
            e.preventDefault();
            alert(1);
            // Do your stuff
        });
    });

    Hope that helps.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.