<div data-role="fieldcontain" class="ui-hide-label"> <label for="username">Username:</label> <input type="text" name="username" id="username" value="" placeholder="Username"/> </div>
Labels are required on form inputs in jQuery Mobile. This allows the library to format the form elements appropriately for mobile devices. Therefore, you need to add a label and use the
for attribute to link it to the form input. The good news is that jQuery mobile provides a class that you can easily hide the label with.