Basically, I want to be able to update an ACF block’s attribute (and potentially re-render it) whilst it is not selected, and so the ACF input for that attribute does not currently exist on the page.
When a block is selected, in the sidebar there would be the input to change the value of the attribute, which would then re-render the block. I want to simulate that change event, so that my block receives the new value, without requiring user input.
I have looked at the docs but not found anything too useful, the closest was acf.getField(‘field_6058fe03eedf2’).val( ‘myValue’ ) which would change the selected blocks attribute, but I’d need to do this for multiple unselected blocks.
Is this possible?
Thanks for any help you can provide.
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users