Fork me on GitHub

With the jQuery Mobile Textinput Widget, we can create text fields and text areas in our app.

Text Field

Text Field Widget

Render Element

var content = {};
content['my_text_field'] = {
  theme: 'textfield',
  attributes: {
    value: 'Hello'
  }
};
return content;

dg.theme('textfield', ...)

var html = dg.theme('textfield', {
  attributes: {
    value: 'Hello'
  }
});
return html;

Text Area

Text Area Widget

Render Element

var content = {};
content['my_textarea'] = {
  theme: 'textarea',
  value:'Hello'
};
return content;

dg.theme('textarea', ...)

var html = dg.theme('textarea', { value: 'Hello' });
return html;