Intel XDK - Input Hidden

1

I'm learning how to use Intel XDK. I need to create a hidden field where you will have device information. In html we use hidden , but this command is not accepted in XDK, or I'm doing something wrong.

Code:

<label class="item item-input widget uib_w_6 d-margins" data-uib="ionic/input" data-ver="0" id="dispositivo">
                <input type="text">
            </label>

If I put hidden manually, it will not accept.

    
asked by anonymous 22.09.2015 / 19:49

2 answers

0

There are several ways to do this without putting the "hidden" attribute directly into your HTML.

If you want to do with pure JavaScript, it can be as follows:

document.getElementById("seuEelemento").style.visibility = "hidden";

If you can use jQuery (I do not know if it's possible), it can look like this:

$("#seuEelemento").hide();

If you would like to know more, or have any questions, please follow some documentation:

HTML DOM Style Visibility: link

jQuery .hide: link

    
22.09.2015 / 21:43
0

Dude, probably the CSS of some of the classes is interfering with the layout of the input.

<label data-uib="ionic/input" data-ver="0" id="dispositivo">
    <input class="text-input" type="hidden">
</label>

I did this and it worked, if I change it to text, it appears, if I put the hidden it is hidden but appears in Inspect Element of the Browser. And complementing Nikofoxxx's response, you can use Jquery as long as you're calling the file, just like in any HTML.

    
31.03.2017 / 15:30