Min/max options
Is there a way to limit or require the number of attached posts similar as the relationship field of ACF? I'm basically using this field in place of the post search field for the nicer UI but want the user to only select one post.
Hi @jancbeck AFAIK the min/max functionality has not been implemented yet but please anybody feel free to correct me as I am also looking for this. I created a PR for the "max-items" functionality which is waiting to be merged. https://github.com/CMB2/cmb2-attached-posts/pull/52
I tried @mclaurent 's solution and it doesn't work.
If I add the data attribute as prescribed in the example provided, this piece results in an undefined variable:
var maxItems = $input.data('max-items');
I sadly don't have any sort of followup suggestion either.