Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Min/max options #56

Open
jancbeck opened this issue Jun 8, 2018 · 3 comments
Open

Min/max options #56

jancbeck opened this issue Jun 8, 2018 · 3 comments

Comments

@jancbeck
Copy link

jancbeck commented Jun 8, 2018

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.

@mclaurent
Copy link

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. #52

@Fiorinol
Copy link

Fiorinol commented Jul 2, 2020

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');

@tw2113
Copy link

tw2113 commented Jul 3, 2020

I sadly don't have any sort of followup suggestion either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants