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.9.4-RC5 is now available! Go get it now

Have only one departement

I am making a per department forms and I am wondering how do You make it so the help topic is always for example IT. Do I change the value in the example below? [HTML]
Help Topic:


 * <?=$errors['topicId']?>


[/HTML]

Comments

  • well I guess the question is that I want to make custom questions on a per department bias. I want all the questions to pool into the message field when I'm done.

    So with the one department thing I just want to get rid of the Help Topic and replace it with the department that I have for that forum.
  • If you want a certain help topic or department every time I would suggest getting rid of the field all together. replace it with
  • Just to make sure I replace [HTML]

     * <?=$errors['topicId']?>
    [/HTML]

    With...




    The part im confused about is how does the form know that value is for the department ID?
  • When I do that I get an error message. Heres the code.
    [HTML]








    [/HTML]

    and here is the error.
    Full Name:

     * <?=$errors['name']?>
    Subject:

    ">
     * <?=$errors['subject']?>
  • oops, i forgot name="topicId" inside the

  • Thanks that works, im starting to feel like an idiot but I want to make multiple questions but have them all go into the message I'm trying to find the message variable but can't find it. I know it would work out like;

    question one (input box)
    question two (input box)

    and then have

    $message = q1 $ q2;

    but can't find where that is.
  • You need to add the fields to the open.inc.php. Then in open.php ~ line 24 before this part

        //Ticket::create...checks for errors..
    if(($ticket=Ticket::create($_POST,$errors,SOURCE))){


    You can add

    $_POST['message'] = $_POST['q1'].\"/r/n\".$_POST['q2'];
  • I added the line to the open.php, changed all the 'messages' to 'q1'. But I get a white screen when I try it on our server.
    [HTML] //Ticket::create...checks for errors..
    if(($ticket=Ticket::create($_POST,$errors,SOURCE))){
    $msg='Support ticket request created';
    $_POST['message'] = $_POST['q1']."/r/n"."$_POST['q2'];
    if($thisclient && $thisclient->isValid()) //Logged in...simply view the newly created ticket.
    @header('Location: view.php?id='.$ticket->getExtId());
    //Thank the user and promise speedy resolution!
    $inc='thankyou.inc.php';
    }else{
    [/HTML]

    thanks for the help
  • There shouldn't be a quotation before the $_POST['q2'];

    And the line you added should be before the part I said, sorry.
  • thanks for all the help,


    I was just wondering if there is a way to add the question to the q1.

    ex

    <tr>
    <th width=\"18%\">What city do you live in?</th>
    <td>
    <input type=\"text\" name=\"q2\" size=\"35\" id=\"city\">*
    &nbsp;<font class=\"error\">&nbsp;</font>
    </td>
    </tr>
  • The code I gave you should append the q1 to the end of the message and q2 on the next line. If you want it displayed differently, I would need to know exactly how you wanted it and I could show you how.
  • ok the example,

    q1=

    What city do you live in?(user types "Paris")

    q2=
    Where did u last travel?(user types "london")

    right now the results would be;

    Paris
    london

    What I would like it to look like,


    What city do you live in? Paris
    Where did u last travel? london

    the next thing is that each department has different questions, so I can't just add the question as a string add.
Sign In or Register to comment.