Forum Replies Created
-
AuthorPosts
-
Mitchell Valk
ParticipantThanks for the response, the thing I'm trying to do is check if a post exists already that has 1 or 2 exact values. So to be more specific, I'm adding a chapter, and a chapter can have a chapter_number and chapter_part meta, so I'm already checking if the chapter_number is unique, but if chapter_part is also set, it needs to look for a post that has both metas set and if it exists, return false.
So far all my attempts to get the data of 2 fields in one remote validation have not worked.
Mitchell Valk
ParticipantFor other people trying to initially find out how the remote function works, since I had some issue finding this out initially, here's some sample code.
'validation' => array( 'rules' => array( 'field_id' => array( 'remote' => admin_url( 'admin-ajax.php?action={action_name}' ), ), ), ),add_action( 'wp_ajax_{action_name}', 'remote_validation' ); function remote_validation() { echo wp_json_encode( 'true' ); return true; }November 20, 2020 at 4:14 AM in reply to: ℹ️METABOXERS! Help get OxygenBuilder integration by upvoting this github issue #22932Mitchell Valk
ParticipantAs long as this doesn't bloat the Metabox core, I'm all for it.
Mitchell Valk
ParticipantDid you add them to your repositories in your composer.json? It is not really clear in the explanation, but it is a requirement for using the connection.
"repositories": [ { "type": "composer", "url": "https://packages.metabox.io/{your key}" }, { "type": "composer", "url": "https://wpackagist.org" } ], -
AuthorPosts