Class bbq.gui.form.Form

Extends bbq.gui.GUIWidget.
Defined in: Form.js.

This is a collection of form fields with names and values. Calling Form#getValues returns a key/value Object of values.

// create two fields
var field1 = new bbq.gui.form.TextField({name: "foo"});
var field2 = new bbq.gui.form.TextField({name: "bar"});

// add them to our form
var form = new bbq.gui.form.Form();
form.appendChild(field1);
form.appendChild(field2);

// set the values on the fields
field1.setValue("hello");
field2.setValue("world");

// returns {foo: "hello", bar: "world"}
form.getValues();

Class Summary
Constructor Attributes Constructor Name and Description
 
bbq.gui.form.Form(options, options)
This is a collection of form fields with names and values.
Fields borrowed from class bbq.lang.Delegator:
options
Method Summary
Method Attributes Method Name and Description
 
 
Methods borrowed from class bbq.gui.GUIWidget:
addClass, appendBefore, appendChild, appendTo, blur, empty, focus, getAttribute, getID, getStyle, hide, insertAtTop, insertBefore, isClass, registerObject, removeChild, removeClass, replaceChild, resize, setAttribute, setID, setRootNode, setStyle, show
Methods borrowed from class bbq.lang.Delegator:
delegateMethod
Methods borrowed from class bbq.lang.Watchable:
deRegisterListener, notifyListener, notifyListeners, registerListener, registerOneTimeListener

Constructor Detail

bbq.gui.form.Form(options, options)

Parameters:
Name Type Comment
options {Object}
options

Method Detail

{Object} getValues()

Throws:
{Error}
The error has two fields {String} error for language translations and {bbq.gui.form.FormField} field which is the field which caused the error.
Returns:
{Object} Key/value parings of form elements previously added to this form.

render()