Linking to a default department in the ticket submission layout

There are 2 possible solutions for setting a default department in the ticket submission layout:

1. Using the Submit Layout menu item

The Submit Layout menu item redirects the user to the ticket submission form. It only includes a single configuration option:

Default Department: A dropdown menu item containing all available departments. Choosing a department here will render the menu item to have that department selected by default in the frontend.

However, this solution is quite restrictive, as there are certain cases when you might need to link to the ticket submission layout, but have different departments selected by default depending on the users' needs.

2. Using the department_id parameter

We have addressed this need by adding one more (optional) parameter in the ticket submission layout's link - department_id. It can be used as in the following example:

If you are encountering any issues or have any questions, please submit a ticket to one of our customer support departments:

<a href="/index.php?option=com_rsticketspro&view=submit&Itemid=830&department_id=1">Licensing</a>

<a href="/index.php?option=com_rsticketspro&view=submit&Itemid=830&department_id=2">Billing</a>

When the user clicks on one of the links, the ticket submission form he will be redirected to will have the linked department selected by default in the Department field.

Additional example: Hiding the Department field

The second scenario can be extended. If you wish to only allow users to submit tickets to the linked departments, you can implement the example provided above and, by altering the component's CSS. you can hide the Department field in the ticket submission form so that users cannot select another department.

To achieve this, please add this code, usually within a custom.css file from your template:

    #jform_department_id, #jform_department_id-lbl{
    display:none !important;

When the user clicks on one of the links, he will be redirected to the ticket submission form, where the Department field will be hidden, so that they cannot select a different department.

3 persons found this article helpful.

Was this article helpful?

Yes No
Sorry about that

You Should Also Read

RSTickets! Pro menu items disappear