+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: can i add district to the location

  1. #11
    Hello Rudi,

    I tried it just today but it didn't work properly.
    Not all locations have a 3-rd level sublocations, but when selecting any location which has not, it's adding a 3-rd level disabled select. So how to make disabled selects not appear?
    Thanks!

  2. #12
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Hello,

    I've checked it again and this code works well on my end
    Last edited by Rudi; February 8, 2022 at 02:33 AM.

  3. #13
    Hello,

    Did you check it after adding a 3rd level for some location, and by selecting with both of them, with and without which doesn't have a 3rd level?
    If you select a location that doesn't have a 3rd level does it remain invisible?

    2022-02-08_155251.png

    2022-02-08_154307.png
    Last edited by Logmanov; February 8, 2022 at 11:58 AM.

  4. #14
    I changed this function like

    $('select[name*=level2]').on('change', function() {
    if($('select[name*=level3]').attr('disabled', false)){
    $('select[name*=level3]').closest('.submit-cell').css('display', 'block');
    };
    });

    But it didn't work.

  5. #15
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Yes, I use the code from my post and it hides the 3d level

    maybe you're doing something wrong

  6. #16
    Initially it is hidden, but when the 2nd level of any location is selected it adds the 3rd level, even if the location hasn't that.

  7. #17
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Ok, I've corrected my code

  8. #18
    Hello Rudi,

    Thank you for efforts to support us. I'll check this new code.
    Now I'm busy with another problem that happened yesterday when I tried to make location urls multilingual. My xampp server refused to work.
    I'm looking for a solution.

    2022-02-09_114514.png

    Any suggestions will be appreciated!

  9. #19
    Maybe it has something to do with the phpMyadmin configuration, but I'm not sure.
    In phpMyadmin when I went to the operations tab there was an error notification

    2022-02-09_120407.png

    Then I clicked on the link to find out the cause of this error and got to the page
    2022-02-09_120504.png

    then I got new tables in DB below all existing tables.
    2022-02-09_120156.png

    But it happened not yesterday, I just noticed them yesterday.

+ Reply to Thread