AdvancedCustomFields / AdvancedCustomFields/acf
update_sub_field does not work with field type group
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
When I try to use the update_sub_field() function; There is no way to update a field in a group (it doesn't matter at the first nesting level, or at any other).
examples:
update_sub_field(array("group_1","text_1_field"), "new_val", $post_id);
update_sub_field(array ("repeater_1_name","1", "group_2","text_2_field"));
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 locating the update_sub_field() entry point and reproducing the two examples, including a group nested in a repeater. Trace how the field path is resolved for group fields and verify that updates work at both nesting levels; done means both examples update the requested value without affecting unrelated fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100