Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Do Not Show Topics But Have DIfferent Links To Forms

I want to set up a few topics, but remove the option from the open ticket form and have different url's that link straight to the topic open ticket page.

Does this make sense?

I am trying to set up forms for different clients that essentially ask the same questions, but I want each ticket sortable/traceable by client (topic).

Thanks in advance for your help.

Comments

  • You'd have to hide/delete the combobox for helptopic and in the url add ?topicId=2
  • edited July 28
    Thanks for the ?topicId=2pointer - works exactly how I want.

    I found this code in include/client/open.inc.php:

    <tbody>
        <tr><td colspan="2"><hr />
            <div class="form-header" style="margin-bottom:0.5em">
            <b><?php echo __('Help Topic'); ?></b>
            </div>
        </td></tr>
       <tr>
           <td colspan="2">
                <select id="topicId" name="topicId" onchange="javascript:
                        var data = $(':input[name]', '#dynamic-form').serialize();
                        $.ajax(
                         'ajax.php/form/help-topic/' + this.value,
                          {
                            data: data,
                            dataType: 'json',
                            success: function(json) {
                              $('#dynamic-form').empty().append(json.html);
                      $(document.head).append(json.media);
                            }
                          });">
                    <option value="" selected="selected">&mdash; <?php echo __('Select a Help Topic');?> &mdash;</option>
                    <?php
                    if($topics=Topic::getPublicHelpTopics()) {
                        foreach($topics as $id =>$name) {
                            echo sprintf('<option value="%d" %s>%s</option>',
                                    $id, ($info['topicId']==$id)?'selected="selected"':'', $name);
                        }
                } else { ?>
                        <option value="0" ><?php echo __('General Inquiry');?></option>
                    <?php
                    } ?>
                </select>
                <font class="error">*&nbsp;<?php echo $errors['topicId']; ?></font>
            </td>
        </tr>
       </tbody>

    From about line 57.  I could not comment it out, so removing it takes out the Topic selection option, but, it does not 'choose' the topic and I get an incomplete form error!
Sign In or Register to comment.