Conditional Logic Option to Delete meta for Hidden Fields

Support MB Conditional Logic Conditional Logic Option to Delete meta for Hidden Fields

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #49695
    Jacob HillJacob Hill
    Participant

    Hi, I'm building a calendar event recurrence engine that uses Metabox and conditional logic to conditionally show and hide fields.

    My problem is that if the user changes the recurrence types, other recurrence fields are hidden, but their values remain creating conflicts with further PHP processing.

    Is there any way to delete the post meta for fields that are conditionally hidden? Thanks in advance!

    #49696
    Jacob HillJacob Hill
    Participant

    I did see this old post as well: https://support.metabox.io/topic/disable-delete-fields-that-are-hidden-conditionally/

    #49701
    PeterPeter
    Moderator

    Hello Jacob,

    Thanks for reaching out.

    Yes, that is the custom code. There isn't an option to remove the field value if it is hidden. You can use the JS code to set the empty value for the field.

    #49705
    Jacob HillJacob Hill
    Participant

    Hi Peter, thank you for the response! I really do believe this should be a feature. Maybe a "remove field value when hidden" or something like that. When building workflows that are reliant on clean data, this causes a lot of issues.

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