• Resolved yajuvendra1990

    (@yajuvendra1990)


    Form fields does not showing in ticket history, I want to show customer-company and customer-website etc fields in ticket history please let me know how to do this

Viewing 6 replies - 1 through 6 (of 6 total)
  • Anonymous User 15356385

    (@anonymized-15356385)

    We do not currently have functionality to display these fields without some custom code.

    The /templates/view-ticket.php template can be adjusted to display these fields. You can either copy the template to /your-theme/kbs_templates/view-ticket.php and add the code, or you can hook into one of the available actions within the template file and display the fields that way.

    We are working on a new custom ticket fields extension which will make it easier to display such fields in the future.

    Thread Starter yajuvendra1990

    (@yajuvendra1990)

    I have created custom form fields named country, state, address and using below code to show on ticket history page but its not showing

    <?php echo $customer->country; ?>
    <?php echo $customer->state; ?>
    <?php echo $customer->address; ?>

    Also I have checked It is a post meta of ticket post using below code

    <?php												 
      $myvals = get_post_meta( $ticket->ID);
      foreach($myvals as $key=>$val)
      {
        echo $key . ' : ' . $val[0] . '<br/>';
      }
    ?>

    but when we using below code its also not showing on ticket history page

    <?php echo get_post_meta($ticket->ID, 'country', true); ?>
    <?php echo get_post_meta($ticket->ID, 'state', true); ?>
    <?php echo get_post_meta($ticket->ID, 'address', true); ?>
    Anonymous User 15356385

    (@anonymized-15356385)

    The data is not stored in post meta. We have helper functions and class variables to retrieve the data.

    <?php echo $customer->get_meta( 'address', true ); ?>
    <?php echo $customer->website; ?>
    <?php echo $customer->company; ?>

    Thread Starter yajuvendra1990

    (@yajuvendra1990)

    Thank you for reply but unfortunately your mention above code is not displaying anything on view ticket page and also I have updated your plugin and now it also does not showing company name. I have checked company name mapping option is removed in submission form in your updated version.

    Anonymous User 15356385

    (@anonymized-15356385)

    The company mapping was not removed in our update. If it is not displayed in your form it is possible you already have it mapped against another field.

    If the example code I provided is not working I would need to understand where you are inserting the code, and see the code to provide assistance.

    • This reply was modified 4 years, 4 months ago by Anonymous User 15356385.
    Thread Starter yajuvendra1990

    (@yajuvendra1990)

    Thank you for your reply, may be the company name mapped against another field. Otherwise my issue has been resolved. I’m able to displayed forms data on ticket history page.

    $formDATA = $ticket->form_data;
    echo $formDATA['data']['kbs-company-name'];
    echo $formDATA['data']['kbs-country'];
    echo $formDATA['data']['kbs-address-optional'];
    echo $formDATA['data']['kbs-website-optional'];
    echo $formDATA['data']['kbs-email'];
    echo $formDATA['data']['kbs-country'];
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Form submission fields does not showing in ticket history’ is closed to new replies.