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

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:

Select One
$services= db_query('SELECT topic_id,topic FROM '.TOPIC_TABLE.' WHERE isactive=1 ORDER BY topic');
while (list($topicId,$topic) = db_fetch_row($services)){
$selected = ($info['topicId']==$topicId)?'selected':''; ?>
General Inquiry

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



  • 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]

    Select One
    $services= db_query('SELECT topic_id,topic FROM '.TOPIC_TABLE.' WHERE isactive=1 ORDER BY topic');
    while (list($topicId,$topic) = db_fetch_row($services)){
    $selected = ($info['topicId']==$topicId)?'selected':''; ?>
    General Inquiry

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


    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.


    and here is the error.
    Full Name:

    Select One
    <? $services= db_query('SELECT firstname,lastname FROM '.CLIENT_TABLE.' ORDER BY lastname');
    while (list($firstname,$lastname) = db_fetch_row($services)){?>
    <?=$lastname?>" <?
    if($_POST['name']==$firstname." ".$lastname) echo 'selected="selected"';
    ?>><?=$firstname?> <?=$lastname?>
    <? } ?>

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

     * <?=$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 Then in open.php ~ line 24 before this part

        //Ticket::create...checks for errors..

    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..
    $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!

    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.


    <th width=\"18%\">What city do you live in?</th>
    <input type=\"text\" name=\"q2\" size=\"35\" id=\"city\">*
    &nbsp;<font class=\"error\">&nbsp;</font>
  • 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,


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

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

    right now the results would be;


    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.