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

Help Topics in multiple combos

24

Comments

  • Hello friends,

    fixed the problem with {"media":null,"html":null} by reediting the ajax function in the open.inc.php

    Just exchange  
    $('#dynamic-form').load('ajax.php/form/help-topic/' + value , data);
    with
     $.ajax('ajax.php/form/help-topic/' + value,{
                data: data,
                dataType: 'json',
                success: function(json) {
                  $('#dynamic-form').empty().append(json.html);
                  $(document.head).append(json.media);
                }
    })
    works like a charm for me!
    I will add the file as an attachment

    Another thing is, that in the multi-dropdown version the customer would not be able to post a ticket with just the "parent topic"
    For Example when you have a topic "A" and topics "A / B", "A / C" you a forced to use either "A / B" or "A / C" but never just use "A"
    I think is might be clever to give this opportunity to the user, because sometimes you just don’t know where the problem really comes from.
    So I just changed
    if(sel.attr("disabled") === "disabled"){
    to
    if(sel.attr("disabled") === "disabled" || sel.val() === ""){
    and it's working as far as i see now.

    Next thing i want to change is dynamically showing or hiding of needed or not needed dropdowns.
    For example when i have a topic with just 2 levels and one with 3 I don’t want to show the 3rd dropdown when the customer selects the topic with just 2 levels.
    i hope all of this was understandable, normally i just talk English but never write anything ;)

    open.inc.php.zip
    3K
  • kudos Suntas. This fixes all the problems, at least for now ;)
    Will it be possible for you to look into adding cascading drop down to other fields too apart form help topic. 
    Thanks
    7461286aa5c55b6e6ebd10b6fa0e3b.png
    839 x 736 - 53K
  • cool. 
    will check it out tomorrow. don't have time right now.
    would never have worked out that fix myself   :(


    re: hiding dropdowns, what would be ideal is if it only showed the 1st level dropdown, and then expanded to show each sub-level dropdown only once a selection is made that actually requires it. so even if every help topic has at least 3 levels, only the top-level dropdown is shown when the page is first loaded.
  • Got it!
    Now the dropdowns only get displayed when needed.
    So startingpoint is dropdown 1, dropdown 2 gets displayed after selecting an option in 1 but only if there is anything to select.
    Just a tiny jquery script and 1 line of php code to hide the dropdowns on start.

    File is attached!
    @ bond007: don't know at the moment. I will try to look into it.
    open.inc.php.zip
    3K
  • edited December 2014

    Hey bond007
    I have a few questions about your issue.
    In your screenshot you have two fields, one called "Category" and "Sub Category".
    How did you add them to the form? I presume, that they are just 2 added field in a custom form with the type "Choices", correct?
    And if I understand you correctly your idea is to add ONE custom form field of type "Choices", put in a few choices in the form of "A", "B", "A / C", "B / C" (a.s.o.) and this should generate 2 dropdowns as we have now in the "Help Topic" section.
    Frist one with options A and B
    Second with options C and D (a.s.o.)

    Everything right to this point?

  • looks good. 

    looks like there might be a special case scenario where the 'Select an option' option is actually selected (highlighted in blue) on a sub-level and then one of the parent levels is changed. the highlighted sub-level doesn't get hidden, but is disabled.

    probably not a big deal, unlikely to be a regular occurrence anyway, but might be worth checking in case it passes another variable through on selection.


  • Oh, you are right. hm
    Quite weird, The Script should just hide every select that is disabled.
    Have to check that....
  • Ok, I think it's working now.
    Strange jQuery stuff, I'll never really understand it.

    New file attached!
    open.inc.php.zip
    3K
  • edited December 2014
    Hey again!

    I'm just here to drop a complete pack with all 3 files which are needed to get my changes working, just to make sure you have everything you need in one zip!

    sosamv and nhybgtvfr made the important changes in the files, I am just the one playing around with them ;)

    Files are for 1.9.4 (or at least it's the version I'm working with right now)
    multiple-combos.zip
    9K
  • Hey bond007 I have a few questions about your issue. In your screenshot you have two fields, one called "Category" and "Sub Category". How did you add them to the form? I presume, that they are just 2 added field in a custom form with the type "Choices", correct? And if I understand you correctly your idea is to add ONE custom form field of type "Choices", put in a few choices in the form of "A", "B", "A / C", "B / C" (a.s.o.) and this should generate 2 dropdowns as we have now in the "Help Topic" section. Frist one with options A and B Second with options C and D (a.s.o.) Everything right to this point?
    Suntas, I am sorry for delayed response. Was busy with some work here.But you got it right, If we could add this to ticket entry form page. 
  • @Suntas,

    Awesome tweaks. Works like charm. Thanks so much to you as well as others who have contributed to this mod.

    Cheers
  • WOW Tanks!
    Saved me!
  • Hi,

    I am new to OSTicket but have found it to be a great product, i only have 2 issues and this nearly fixes one of them so many thanks to you all.

    The only thing i have noticed is that it does not take into account whether a help topic is marked as Disabled or Private, i am not a great JS or PHP developer (know just enough to get by) so could you let me know how to fix this.

    Also can the same functionality be easily applied to the agent side for new and edit?
  • edited January 2015
    +1 for the help request sdavey mentioned.  Otherwise, very slick mod that seems to work fine in 1.9.5 as well.
  • there is no validation
    if the user choose the first option
    when submit without choose the second root the form is submitted
  • @stevekim @bond007 do we have a confirmed tutorial on adding these combo menus to a form?
  • @dusza, not much of a tutorial needed here.  Download the zip package @Suntas published back in December, and replace the files you currently have in your osticket directory with the ones inside the zip file.  If you have any customizations to the files that will be replaced, you'll need to re-write the custom code in the @Suntas modified version. 
  • @stevekim I'm also on v1.9.5 but I'm not seeing this work with my install for some reason.  I replaced files with the post (below) from @Sunta.  The screenshot attached shows Help Topics where I've used a parent topic and also two custom lists.  I think I'm missing a step somewhere as to how these chained menus are setup within the admin panel of OsTicket.  Ideas?
    Hey again! I'm just here to drop a complete pack with all 3 files which are needed to get my changes working, just to make sure you have everything you need in one zip! sosamv and nhybgtvfr made the important changes in the files, I am just the one playing around with them ;) Files are for 1.9.4 (or at least it's the version I'm working with right now)

    OsTicket-Screenshot.jpg
    966 x 982 - 79K
  • edited January 2015
    Hey again! I'm just here to drop a complete pack with all 3 files which are needed to get my changes working, just to make sure you have everything you need in one zip! sosamv and nhybgtvfr made the important changes in the files, I am just the one playing around with them ;) Files are for 1.9.4 (or at least it's the version I'm working with right now)

  • Did you forget to attach the files?
  • edited January 2015
    Did you forget to attach the files?

    yes sorry @ntozier and the version is wrong too is v1.9.5.1 the one im using right now

  • Did you forget to attach the files? yes sorry @ntozier and the version is wrong too is v1.9.5.1 the one im using right now
    @ luisblue1986

    Did you forget to attached files ? Please ... I am in  v1.9.5 (ecb4f89).
     

  • Hey bond007 I have a few questions about your issue. In your screenshot you have two fields, one called "Category" and "Sub Category". How did you add them to the form? I presume, that they are just 2 added field in a custom form with the type "Choices", correct? And if I understand you correctly your idea is to add ONE custom form field of type "Choices", put in a few choices in the form of "A", "B", "A / C", "B / C" (a.s.o.) and this should generate 2 dropdowns as we have now in the "Help Topic" section. Frist one with options A and B Second with options C and D (a.s.o.) Everything right to this point? Suntas, I am sorry for delayed response. Was busy with some work here.But you got it right, If we could add this to ticket entry form page. 
    @ Suntas and @bond007
    Help topics with multiple combos works fine for me in v1.9.5. But, I also want to have the same functionality as mentioned by bond007. Is there any updates for this? Thanks much.
  • edited February 2015
    Did you forget to attach the files? yes sorry @ntozier and the version is wrong too is v1.9.5.1 the one im using right now @ luisblue1986 Did you forget to attached files ? Please ... I am in  v1.9.5 (ecb4f89).  

  • I can't download any files attached on this forum... Can anyone help me on this.
  • edited February 2015
    @babunatarajan  Are you using IE? Please try with other browser. When I use Google Chrome, I can download files. 
    I can't download any files attached on this forum... Can anyone help me on this.

  • Hey again! I'm just here to drop a complete pack with all 3 files which are needed to get my changes working, just to make sure you have everything you need in one zip! sosamv and nhybgtvfr made the important changes in the files, I am just the one playing around with them ;) Files are for 1.9.4 (or at least it's the version I'm working with right now)
    Hi,
    Are all the files correct, as I have compared open.php from this package with the original and both files are identical. I have made similar comparison of open.php from you first package posted earlier and in fact it contained alternated code.
    Does it mean, the original open.php is fine and we shouldn't touch it?
  • Hello everyone! 

    I'm sorry to see that a lot of people are having troubles. As I mentioned in one of my old posts; I created those changes pretty quick, for a demo. Now I'm being asked to impement the system in my company, so I'm going to go full on osticket now. I'll be doing the changes from scratch in the new version and will post them here as soon as possible. Also I'm going to fully test them.

    Sorry for causing troubles :( I'll keep you guys posted 
  • i have tested this on my system version 1.9.5.1 and it seems after installation to ignore the disabled/active status of a help topic
  • Hi,

    i just newbie of PHP and love musch on this osTicket.
    for this Mod combo could be apply in new ticket in agent panel ?
Sign In or Register to comment.