What is the use of data-role = "fieldcontain"?

I just found that text inputs in a div with data-role="fieldcontain" do not expand to 100%, but if you put text input outside the field, it expands to the fullest. This is a mistake that they are correcting, but in the meantime ...

So, I was wondering what is the use of this data-role="fieldcontain" in the first place? Why say that? I saw this on the docs and I just put it in my html, but why use it?

Thanks!

+7
source share
2 answers

It looks like a field container for grouping and displaying

Container box
A container with data-role = "fieldcontain" wrapped around a pair of label / form elements



Control group
DIV or FIELDSET container with data-role="controlgroup" . Visually integrate several buttons in the style of inputs of the same type (flags, buttons based on links, radio buttons, selects) into a group. For grouping forms of checkboxes and radio buttons, the fieldset container is recommended in the div container with data-role="fieldcontain" to improve label styling.

data-mini true | false - Compact version for all elements in controlgroup
data-type horizontal | vertical - for horizontal or vertical alignment of a position

+7
source

As of jquerymobile 1.4 data-role="fieldcontain" deprecated!

use class="ui-field-contain" instead.

see the release notes http://jquerymobile.com/changelog/1.4.0/

+6
source

All Articles