#79314 Disable select options in drop-down. Custom JS stops working after update

Landing Forums JupiterX WordPress Theme Disable select options in drop-down. Custom JS stops working after update

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Amel Burovic


    I have a drop-down with a few options that are disabled.
    But every time i update JupiterXCore or Elementor the custom  JS code dissappeares and i can not get the code to work again.

    I use JupiterX with Elementor.
    And for the drop-down i use Gravity Forms plugin becuse i need more advanced forms with calculations and other options.

    I have linked a custom JS file to my jupiterx-child theme with following code.

    var op = document.getElementsByTagName(“option”);
    for (var i = 0; i < op.length; i++) {
    // lowercase comparison for case-insensitivity
    (op[i].value.toLowerCase() == “mellanrum|0”)
    ? op[i].disabled = true
    : op[i].disabled = false ;


    the option has a attribute “mellanrum” and is an empty option its purpose is to seperate text to navigate easier.(Look at the image provided)
    I have backed up my plugin and my jupter core so it works fine right now but as soon as i update Elementor or JupterXCore the code stops working.
    So can you please tell me if there is a better way to make this code or solution work so i can keep my plugins and theme updated.

    Wordpress: 5.5
    JupterX Theme 1.20.1 (using JupterX-Child 1.0 theme)
    Elementor 2.9.11 (Later versions makes my code crash)
    JupterXCore 1.15.1 (Later versions makes my code crash)

    Sorry for my English.
    <div class=”jhH5U”>
    <div id=”tw-ob” class=”tw-src-ltr”>
    <div class=”oSioSc”>
    <div id=”tw-target”>
    <div id=”kAz1tf” class=”g9WsWb”>
    <div class=”iYB33c”>
    <div id=”tw-tmenu” class=”tw-menu”>Have a nice day</div>
    <div id=”tw-images”></div>
    <div class=”dURPtb”></div>

    Nodari Support Team

    Hey there

    Well, I think your problem is not properly stored JS code, may I ask where you save that code saved?
    There are different methods on how to add JS code to the WordPress pages, easiest way is to use a plugin like this:

    For other methods you may consider this article:

    Please also note, this question is directly related to the Ninja forms plugin, so, its worth to check their documentation or support as well, most probably they also have their methods to add JS to the forms

    Hope this helps 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login