Custom Fields
Re-Envisioned
Support Meta Box Group Data in cloneable group not saving

  • Creator
    Topic
  • #32897
    Resolved Kenneth Lang
    Participant

    Hello,
    I've been working with MetaBox Group to have a group of 3 cloneable admin fields, and it's working great. I figured out how to have an existing taxomony on the site, called "group_presenters", appear in a dropdown within the MetaBox Group. Here's the code I used in functions.php:
    <div>
    array(
    'name' => 'Speaker',
    'id' => 'group_presenters',
    'title' => 'Group Presenter',
    'type' => 'taxonomy',
    'taxonomy' => 'group_presenters',
    'multiple' => true,
    'ajax' => true,
    </div>

    The dropdown of the existing taxonomy is showing properly in the MetaBox Group on the admin page, and you can choose items from the list, but it's not saving that data once you update the page. Do we have to do something in the database so the data gets saved? What's wrong here? Thank you for your help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #32902
    Long Nguyen
    Moderator

    Hi,

    Please refer to this topic to use the field taxonomy_advanced
    https://metabox.io/support/topic/not-show-taxonomy-field-values-in-mb-blocks/

    #32914
    Kenneth Lang
    Participant

    Thank you - worked perfectly!

    A follow up question. In each cloneable group's data, we have a date for each cloned group, and we want to delete old dates and their associated objects once the date has passed. How can we write a cron job to do that? My programmer is good at that sort of thing but wasn't sure how to do it because it's not a straightforward table due to the cloned elements. How can we accomplish this? Thank you!

    #32927
    Long Nguyen
    Moderator

    Hi,

    You can follow this documentation to get the subfield value in a group https://docs.metabox.io/extensions/meta-box-group/#getting-sub-field-values

    and this documentation to create a cronjob in WordPress site https://developer.wordpress.org/reference/functions/wp_schedule_event/

    #32943
    Kenneth Lang
    Participant

    Thank you - could you be more specific with how we can set up a cron job to remove a MetaBox cloned group once the date in it has passed? There are 4 pieces of data in each cloned group, and the first is an upcoming date, so we need the whole cloned group to be removed via a cron job once the date has passed. Thank you for any help you can lend with this.

    #32974
    Kenneth Lang
    Participant

    Hi, happy new year. I'm submitting this again in case it got lost in the end-of-the-year shuffle. Thank you.


    Thank you - could you be more specific with how we can set up a cron job to remove a MetaBox cloned group once the date in it has passed? There are 4 pieces of data in each cloned group, and the first is an upcoming date, so we need the whole cloned group to be removed via a cron job once the date has passed. Thank you for any help you can lend with this.

    #32982
    Long Nguyen
    Moderator

    Hi,

    You can refer to this topic to know how to update the group value or delete a cloneable in a group https://metabox.io/support/topic/replace-array-value-in-group/
    Then contact your developer to create the cronjob.

    Or create a service request here https://metabox.io/contact/
    I will forward it to our development team, estimate the job, and get back to you with a quote.

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