fbpx

wpf_get_field_type()

#Overview

This function retrieves the Field Type on the Contact Fields list for a given field.

#Parameters

wpf_get_field_type( $meta_key, $default = 'text' )
  • $meta_key (string) (Required): The meta key to retrieve the field type of.
  • $default (string) (Optional): The default value to return if no type is found.

#Return

(string) The field type.

#Get a fields Field Type.

$field_type = wpf_get_field_type( $meta_key );

#Get a fields Field Type, but pass a string if no Field Type is found

$field_type = wpf_get_field_type( $meta_key, $default = 'default' );

Was this helpful?

Our Black Friday Sale is Here! 🎉

Take advantage of the biggest discount we’ve ever offered. Save 30% off new licenses and upgrades.

Days
Hours
Minutes
Seconds
Sorry, this offer has expired.

Valid until Monday December 2nd. See Terms and Conditions