WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Change meta field of Custom Post Type UI with Ajax? (3 posts)

  1. maorb
    Member
    Posted 3 years ago #

    Hi,

    Another issue I encounter with the UI admin page of a custom post type.
    Let's say I have a meta field of a Custom Post Type, this field is a boolean and can have 2 statuses.

    I want to use Ajax and let the end site's editor to be able to click on this (custom) post's field and change its status.
    Let's say I have post type 'books' and a meta field 'status' with values - 'available' and 'not available'.
    I want this status to be clickable for each book, and the click will change from 'available' to 'not available' and vice versa.

    Now, I have the function custom_columns($column) that does the switch/case to all fields to be shown in the UI.
    So I know that I need to add some AJAX call in the case of the field.
    This is where I need your help to know how to make this call. Of course I want to have thi Ajax call with jQuery, which will be much easier.

    Thanks!

  2. maorb
    Member
    Posted 3 years ago #

    I resolved this and wrote some Ajax functionality to integrate to my admin UI.
    Basically just like any other Ajax calls.

  3. asimac2001
    Member
    Posted 2 years ago #

    Could You please post your code, others people (me as well) could benefit of it :) Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic