Custom Fields
Support Meta Box Conditional Logic Disable (delete) fields that are hidden conditionally? Reply To: Disable (delete) fields that are hidden conditionally?

Anh Tran


Unfortunately, at the moment, CF only hides the fields. Clearing the values might lead to another unexpected behavior: users enter data in field A, and then hide it. After that, they changed their mind and show it. And they might expect the value they already entered.

Let me work on the JS. I think I can add a custom JS event to the field when it’s hid, so you can clear the value yourself. This is my idea:

$( 'input' ).on( 'cl_hide', function() {
    this.value = '';
} );

Regarding the issue with Geolocation, I’ll check and update. Thanks for letting me know.


Subscribe to our newsletter to receive news and tutorials for Meta Box and WordPress.

grid gear info copy caret-up caret-down trash