No, as I mentioned, if you do not need to control the 3rd Party field via the Types or CRED Screens, but will do it programmatically, you will not need to add it to our controls.
Only if you want to edit the fields with Types, or, in CRED, you need to add it to our Controls.
But if the update or field handling is going to happen programmatically only, there is no need to control the Field with Types or CRED.
The Code i provided is different then yours, please see the Syntax of the Custom Field update and get parameters as per the WordPress Codex:
https://codex.wordpress.org/Function_Reference/update_post_meta
This syntax is wrong:
https://toolset.com/forums/topic/append-cred-single-field-value-to-custom-select-field/#post-368930
While this is correct:
https://toolset.com/forums/topic/append-cred-single-field-value-to-custom-select-field/#post-369185
https://toolset.com/forums/topic/append-cred-single-field-value-to-custom-select-field/#post-369528
1. I had a look at the database there are a few occurences of that field inside the postmeta table but I have no idea what to make of it
The instances you see there, are the Fields saved for different posts.
As for your field "medafi_city" you have saved it in 3 Posts ($post_id) and each has a distinct meta_value
(London, Lyon and Paris)
Each of those fields has the same meta_key, a different assigned $post_id and a different meta_key.
Depends which Post ID is passed in your code, you will get the value of the corresponding posts field.
With the $variable $post_id in the CRED form you will always access the current edited/created post ID.
Now your latest explanation is completely different from what I understand from your initial request.
" I want to be able to do that automatically when a user submits a post with a certain city value which would initially be a Types custom field. It's that field that I want to be appending in the medafi_city dropdown values."
This is not appending a value, but changing the value of your 3rd party Custom Field according the value the User passes in your Types Custom Field.
This is done by the same process in a CRED API code, you will get_post_meta() of your Types Field, and then use update_post_meta with the value coming from the Types Field, if those stored Values are exactly identical.
You can use also if{} conditionals in PHP, so you can tell "if the types value is [value], then save my 3rd party Custom Field with this [value]"
hidden link
It seems -unfortunately- that for now you need custom programming work which is beyond the scope of our support.
At this point I would suggest you consider contacting one of our certified partners from this link:
https://toolset.com/consultant/
You will get the custom assistance you need to get on with your project.
I will be happy to assist CRED API and Toolset related issues, also with small snippets of code examples, which I provided above.
§Please let me know if you have further questions regarding the issue mentioned in this Thread
Thank you for your patience.