Skip Navigation

[Resolved] How do I add my custom field to a Ninja Form?

This support ticket is created 2 years, 6 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by melissaD-3 2 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#2156349

I think this is a very basic question, which is maybe why I can't seem to find an answer. I'm creating some custom fields and taxonomies with Toolset. I have a front end Ninja Form that creates a post using these. The taxonomy fields are working fine, but how do I create a custom field on my form? Thank you!

#2156395

Hi, I'm not very experienced with Ninja Forms so I don't have any specific guidance available for that system. However, I can tell you in general that Toolset's custom fields for posts are stored in the standard postmeta table of the WordPress database using a slug prefix of wpcf-. So if your custom field in wp-admin has a slug of "custom-text" for example, then your custom field input in a 3rd-party form should probably use the field slug format wpcf-custom-text. Otherwise, information will not be stored in the appropriate corresponding Types custom field.

Also, it's important to note the field data format as required for the database. Depending on the field type, the data format may be different. For example, Types date fields store data in a format called "Unix timestamp". If you try to save a date in a format like "08/31/2021", that won't work. That format must be converted into Unix timestamp format to be accepted in a Types date field. Checkboxes groups fields store data in a serialized data format, and a special function is necessary to convert those values into serialized data.

I can offer more direct guidance if you have questions about a specific field type.

#2159055

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.