Skip Navigation

[Resolved] Is it possible to add more custom field type?

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Pastor Walt 9 years, 5 months ago.

Assisted by: Waqas.

Author
Posts
#264516

I am looking to add a custom field for address information and wanted to add a custom field type for the state field.

#264522

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Yes you can add your custom field types, but that requires custom coding efforts. We have an example on Word Press' public repository at https://plugins.trac.wordpress.org/browser/types/trunk/embedded/includes/examples/google_map.php which demonstrates how you can add a simple Google Maps field type.

I hope you can follow the example easily.

#264529

That's a great custom type! Where would I need to place that code (directory) to activate it?

#264531

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

You should place the code directly in your active theme's functions.php.

On the other hand, for the sake of 'clean code', you can:

1. Copy file to your theme's folder
2. Edit file functions.php and add following line at the end of the file:

include_once('google_map.php');

You can then, see under "Types -> Custom Fields -> Edit Group" screen. It should be added to "Available fields" as "Google Map".

#264537

Great Thanks

The forum ‘Types Community Support’ is closed to new topics and replies.

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