validating extended post type relationship fields
-
I have a pod extending wp post type. It has two relationship fields – a single select and a multiple select. I’m trying to validate these two fields client side in the post edit screen – they are both conditional and depend on the category selected.
Im a react.js novice so while I’m able to get the value of the single select via document.getElementById, I’m struggling to get hold of values with the multiple select – document.getElementsByName returns a static node list so doesn’t refect dom changes. Is there a pods equivalent for wp.data.select( ‘core/editor’ ).getEditedPostAttribute or something else I can use to get multiple select values or establish if there arent any? I can’t seem to find documentation on this.
- The topic ‘validating extended post type relationship fields’ is closed to new replies.