Hello,
Thanks for the feedback!
Where exactly do you use your code?
update_field('field_6634d4aa4f1a8', $dueDate, $clientID);
What is the $clientID variable? is it a Post ID, or a User ID? Note that if you want to update a field on a User profile, you have to use the following syntax: user_45. Example:
update_field('field_6634d4aa4f1a8', $dueDate, 'user_45');
If you just use a number, ACF will update the field on a post. See ACF documentation.
Regarding the metadata in the admin that is blank, I would recommend to enable the Developer Mode, it will show you any metadata saved on each Post, Term, Options Pages or User Profiles. This might help you to debug it.
If you need further assistance, please export your Form in either PHP or Json (using the Export link on the top right corner of your Form UI). So I can try to try to test on my local environment. An export of your Field Group will also help.
Thanks!
Regards.
Hi Konrad,
Thanks for the reply. $clientID is a normal post ID, not a user field – so that’s okay.
How can I send the exported PHP field group and form to you privately, please?
Thanks.
Hello,
I would recommend to enable the Developer Mode in order to see which metadata is saved on your post in the admin.
I’m still not 100% sure to fully understand the issue. When you say “it shows on the front-end”, do you mean get_field() works on the front-end and shows the correct value? or the field is displayed on a front-end form and it has the correct value?
Also, where do you use that code? In which hook?
update_field('field_6634d4aa4f1a8', $dueDate, $clientID);
I’ll need more details, and ideally a screenshot or a video record showing the issue as it’s really vague at the moment.
I sent you an email from your website, so you can share your Field Group export and ACFE Form export.
Thanks.
Regards.