AdvancedCustomFields / AdvancedCustomFields/acf
ACF select2 : can't emulate a click on an option in Javascript
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Hi everyone
I use acf_form() to let people editing post_type on my webiste. Works like a charm except for one thing, my first field is a selection type with advanced interface aka select2
I have one special case, when a certain user role arrives on the my acf_form(), he can't select what he wants, only 1 option is possible, and it leads to show some fields thanks to ACF's logical.
Problem is, i can't figure out how to emulate the selection of this field with javascript.
Tried so many things my head begins to burn ^^
Thanks in advance for your response and sorry if im not clear ..
++ Gilles
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with acf_form(), an ACF Select2 field, and the role-based restriction described in the report. Investigate how the JavaScript selection interacts with ACF's logical fields; done means the allowed option can be selected programmatically and the dependent fields appear correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100