The field above will also be displayed on the Edit Ticket page in the back end. However, if you also want to display the field in a column in the admin tickets list, and also on a column on the front end customer’s view, then you’ll need to add the show_column argument like this (the only difference here is line 16):

/**
* This example adds a 'show_column' argument.
*
* This adds a custom field to the ticket form, just like above,
* and also adds an argument to show the field column in the ticket list
* on front end and back end.
*/
add_action( 'init', 'my_eddstix_add_custom_field' );
function my_eddstix_add_custom_field() {
if ( function_exists( 'eddstix_add_custom_field' ) ) {
eddstix_add_custom_field( 'my_custom_text_field', array(
'title' => __( 'Phone', 'textdomain' ),
'show_column' => true
)
);
}
}

By default, the type of field will be a text field. You can change the field type with the callback argument. The possible choices for the callback argument are ‘text’ (default), ‘textarea’, ‘url’, or ‘taxonomy’.

The following example adds a textarea field by setting the callback argument to ‘textarea’ on line 11.

You can add a ‘taxonomy’ field by setting the callback argument to ‘taxonomy’. If you add a taxonomy field, you’ll then have to add terms to this new taxonomy in your WordPress dashboard. You’ll see a new menu item for your new taxonomy under the Tickets menu. After you add some terms to the new taxonomy, they’ll appear in a select box on the ticket submission form. The customer will then be able to select one from this custom taxonomy while filling out the submission form.

If you add multiple fields, make sure that each field has its own unique ID. The ID is the first parameter of the eddstix_add_custom_field() function. The following example adds 2 custom fields. Notice that each field has its own unique ID on lines 7 and 14.