Create a new custom field
public static Create ( id $customGroupId, string $name, string $label, integer $order = 1, integer $required_field, integer $type, array $options = null, array $default_value = null, array $properties = null, $duplicate, $helptext = null, $css = null ) : the | ||
$customGroupId | id | the id of the group that will contain the field |
$name | string | the name of the field, the name is used to uniquely identify the field when retrieving its value. |
$label | string | the label of the field, the label is displayed beside the field in Write tab. |
$order | integer | the order of the field when it is displayed in the Write tab. |
$required_field | integer | whether this field is a required field. Required fields doesn't allow users to save a post if they are null. |
$type | integer | the type of the field. Use $FIELD_TYPES defined in MF_Constant.php |
$options | array | array of strings that represent the list of the field if its type is list. |
$default_value | array | array of strings that represent default value(s) of of the field if its type is list. |
$properties | array | an array containing extra properties of the field. |
return | the | new field id |