Fork me on GitHub

Also, checkout the Text Widget page.

Text Field Widget

form.elements['my_textfield'] = {
  title: 'Name',
  type: 'textfield',
  default_value: 'Hello'
};