Skip Navigation

[Resolved] Can't populate custom fields

This support ticket is created 4 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Shane 4 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#1760309
toolseterror.JPG

Tell us what you are trying to do?
Trying to populate custom fields via update_post_meta

Is there any documentation that you are following?
https://toolset.com/documentation/customizing-sites-using-php/updating-types-fields-using-php/

Is there a similar example that we can see?
See the image, instead of updating toolset's fields, it just created a new standard custom field.

What is the link to your site?
hidden link

#1760425

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marcel,

Thank you for getting in touch.

Can you share your code with me so that I can have a look ?

Also when using the update_post_meta() function you need to specify the custom field made in types using the "wpcf-" prefix added onto the slug.

For example if you have a field called "Order Number" and the slug is "order-num" then to populate the field correctly in the database you will need to use the slug "wpcf-order-num".

Please let me know if this helps.
Thanks,
Shane