• Resolved estebantoloza

    (@estebantoloza)


    Hello! I’ve added a custom field. I want this field to be visible to the administrator and to the person generating the ticket only in “my tickets,” but I don’t want it to appear in the ticket submission form. I can hide it with CSS, but I would like to know if you can provide me with a PHP snippet to hide it in the form as well, so that it can only be edited by the site administrator and appears as a “read-only” field for the user.
    So far, what I have is the following:

    add_action( 'plugins_loaded', 'wpas_user_custom_fields' );
    function wpas_user_custom_fields() {
    	if ( function_exists( 'wpas_add_custom_field' ) ) {
      wpas_add_custom_field( 'cotizacion',  array( 
    			'title' => __( 'Cotizacion', 'awesome-support' ), 
    			'order' => 2,
    			'field_type' => 'text'
    		) );
    	}
    }

    I look forward to your response, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide custom field in the form’ is closed to new replies.