I have added this code to my functions .php file shown in the link below and it works fine:
However this codes functionality only issues the ticket number to the owner of the email who the form is sent to. I need to find a way of issuing this ticket number to both the recipient of the email of the form and that same number to be issued in the confirmation email that is sent to the user how has filled out the form.
I attempted to get the functionality working with a hacky fix so that the same ticket number was issued to both parties.
I enabled confirmation email under the advanced tab and set the field tag for Confirmation email subject: to be [Ticket #'.$increment.'] but sadly that did not work.
I'm assuming Mike Challis wrote the original PHP code for this so I'm hoping he does see this!