Textfield

Introduction

A simple HTML text or number input.

Helium View Reference

<textfield/>

Plain HTML

Output widget
<div class="widget-container">
	<label for="w0">Text field label</label>
	<input id="w0" type="text" value="My value" class="widget input textinput">
</div>


JavaScript / jQuery

Output widget - Programmatically
function drawTextInput(){
    var canvas = $('<div />').addClass('widget-container');
    var readOnly = false;
    $('<label />',{
        'for':'w6', 
        'text': 'Input label'
    }).appendTo(canvas);
    $('<input />',{
        'id':'w6', 
        'type':'text', 
        'value':'',
        'disabled':readOnly
    }).addClass("widget input textinput").appendTo(canvas);
    canvas.appendTo($('#embeddedComponentContent'));
}