AdvancedCustomFields / AdvancedCustomFields/acf
Conditionally adjust fields depending on the current ACF block
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Hey @lgladdy
I wondering if there is an ACF build in way to determine if a field group is currently loaded in a specific block type?
I want to hide specific fields if the field group is used in specific block types. But to do this, we have to know what is the current block type, e.g. using a filter like acf/prepare_field.
Is custom javascript the only solution here, to hide fields on block context?
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 with the acf/prepare_field filter named in the issue and trace how field groups are loaded for block types. Determine whether the current block type is available at that entry point and define what support would be needed to conditionally hide fields without custom JavaScript.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- backend, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100