Title: Problem displaying custom fields
Last modified: August 6, 2019

---

# Problem displaying custom fields

 *  Resolved [chrisconquerors](https://wordpress.org/support/users/chrisconquerors/)
 * (@chrisconquerors)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/problem-displaying-custom-fields/)
 * Hello again,
 * I am faced with current problem:
 * I have created a few custom fields. I deactivated the subject field because you
   can’t really do anything with it. So I created a new subject field with a dropdown
   menu in it. Everything works fine except the following:
    The subject is not saved
   into the database nor is it displaying the subject next to the ticket number 
   is the support_page=open_ticket.
 * I have found that if I edit the following code things work:
 * Find in create_ticket.php
 *     ```
       $subject          = get_term_by('slug', 'ticket_subject', 'wpsc_ticket_custom_fields' );
       $wpsc_default_sub = get_term_meta( $subject->term_id,'wpsc_tf_default_subject',true);
       $ticket_subject   = isset($args['ticket_subject']) ? sanitize_text_field($args['ticket_subject']) : apply_filters( 'wpsc_default_subject_text', $wpsc_default_sub,$args );
       ```
   
 * And replace with the new slug name:
 *     ```
       $subject          = get_term_by('slug', 'onderwerp', 'wpsc_ticket_custom_fields' );
       $wpsc_default_sub = get_term_meta( $subject->term_id,'wpsc_tf_default_subject',true);
       $ticket_subject   = isset($args['onderwerp']) ? sanitize_text_field($args['onderwerp']) : apply_filters( 'wpsc_default_subject_text', $wpsc_default_sub,$args );
       ```
   
 * The slug for my subject is ‘onderwerp’ in this case. With this edit everything
   works, but I think that it would be better if we could manually change the slug
   name.
 * Could this be made possible?
 * Also, I have found an issue with conditional fields. Again, on my subject dropdown
   you can choose out of 9 options. If you choose any of these, a condition field
   is opened with a subsequent dropdown. But that second dropdown value is nowhere
   to be found, except under ticket fields.
    It would be really nice if the second
   value were to be added to the subject.
 * Really loving the plugin!
 * Regards,
    Chris
    -  This topic was modified 6 years, 10 months ago by [chrisconquerors](https://wordpress.org/support/users/chrisconquerors/).

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Nikhil G](https://wordpress.org/support/users/nsgawli/)
 * (@nsgawli)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/problem-displaying-custom-fields/#post-11811237)
 * Hello [@chrisconquerors](https://wordpress.org/support/users/chrisconquerors/),
 * Do not change code of the plugin else when you update the plugin your custom 
   code will get removed. Instead of changing core code you can use
    apply_filters(‘
   wpsc_default_subject_text’, $wpsc_default_sub,$args ); to apply your changes.

Viewing 1 replies (of 1 total)

The topic ‘Problem displaying custom fields’ is closed to new replies.

 * ![](https://ps.w.org/supportcandy/assets/icon.svg?rev=2763565)
 * [SupportCandy - Helpdesk & Customer Support Ticket System](https://wordpress.org/plugins/supportcandy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/supportcandy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/supportcandy/)
 * [Active Topics](https://wordpress.org/support/plugin/supportcandy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/supportcandy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/supportcandy/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Nikhil G](https://wordpress.org/support/users/nsgawli/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/problem-displaying-custom-fields/#post-11811237)
 * Status: resolved