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

Limit user's font-family selection #3

Open
mujahidi opened this issue May 3, 2018 · 2 comments
Open

Limit user's font-family selection #3

mujahidi opened this issue May 3, 2018 · 2 comments
Labels

Comments

@mujahidi
Copy link
Owner

mujahidi commented May 3, 2018

Allow the field creator the ability to select one or more fonts from the available fonts to limit the user selection.

@codejp3
Copy link

codejp3 commented Oct 6, 2022

Some may want to only allow 5-10 fonts, but exclude the rest.

Some may want to only exclude 5-10 fonts, but allow the rest.

With hundreds or thousands of Google Fonts available, I can't think of a clean way to accomplish this and still have a smooth/usable interface.

Only way that's hitting me right now is to have a textarea and radio button.

Radio Button - options: Exclude or Include
Textarea - each line is a font_family name, one per line

That way, if you only want to exclude a handful, you select exclude, and then list those fonts in the textarea. If you only want to include a handful, you select include and list those fonts in the textarea.

That opens another world of issues with people typing the wrong font_family names, bad formatting, and so on.

The solution for that is a drag-n-drop approach, or checkboxes for each font where only checked fonts are enabled. Doing this on a per-ACF field creation basis would ruin the user interface (just my opinion).

So, instead of doing this on a per-ACF field creation basis for EVERY acf-typography field added, why not make this a new plugin option in Admin > Settings > ACF Typography, that is setup ONCE and applies to EVERY acf-typography field added. Then in each acf-typography field, add ONE single new Radio Button field where the field creator can Enable/Disable those plugin-wide settings.

Maybe I'm wrong, but I would image that anyone looking to only allow specific fonts for a typography field wants to do so site-wide in the first place. Make that the default, and a single radio button where it could be disabled on a per-ACF field creation basis.

@mujahidi
Copy link
Owner Author

mujahidi commented Oct 8, 2022

Some may want to only allow 5-10 fonts, but exclude the rest.

Some may want to only exclude 5-10 fonts, but allow the rest.

With hundreds or thousands of Google Fonts available, I can't think of a clean way to accomplish this and still have a smooth/usable interface.

Only way that's hitting me right now is to have a textarea and radio button.

Radio Button - options: Exclude or Include Textarea - each line is a font_family name, one per line

That way, if you only want to exclude a handful, you select exclude, and then list those fonts in the textarea. If you only want to include a handful, you select include and list those fonts in the textarea.

That opens another world of issues with people typing the wrong font_family names, bad formatting, and so on.

The solution for that is a drag-n-drop approach, or checkboxes for each font where only checked fonts are enabled. Doing this on a per-ACF field creation basis would ruin the user interface (just my opinion).

So, instead of doing this on a per-ACF field creation basis for EVERY acf-typography field added, why not make this a new plugin option in Admin > Settings > ACF Typography, that is setup ONCE and applies to EVERY acf-typography field added. Then in each acf-typography field, add ONE single new Radio Button field where the field creator can Enable/Disable those plugin-wide settings.

Maybe I'm wrong, but I would image that anyone looking to only allow specific fonts for a typography field wants to do so site-wide in the first place. Make that the default, and a single radio button where it could be disabled on a per-ACF field creation basis.

@codejp3 This is open for discussion. I didn't see a viable option. Therefore, never proceeded with it. Although nobody has ever requested this feature. But I thought maybe this could help.

I am still not sure if it is that important.

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

No branches or pull requests

2 participants