Ext.onReady(function(){	Ext.QuickTips.init();	var dominoForm = document.forms[0];	var extForm = new Ext.form.BasicForm(dominoForm);	extForm.render();	/*To use in conjunction with Decepticon, substitute the following line for the url property below:	dbPath + '/' + document.forms[0].name.substr(1) + '/readformdesign&stylesheet=FormFieldsToJSON'...where 'FormFieldsToJSON' is the name of the Decepticon transform template	*/	Ext.Ajax.request({		url: dbPath + '/(getFormJSON)?OpenAgent&form=' + document.forms[0].name.substr(1),		method: 'GET',		disableCaching: true,		success: function (response) {			var fields = eval ('(' + response.responseText + ')');			var fieldCount = fields.length;			for (var i = 0; i < fieldCount; i++) {				var field = fields[i];				var dominoField = dominoForm[field.name];				if (field.kind === 'editable') {					try {						switch (field.type) {							case 'keyword':								switch (field.ui) {									case 'radiobutton':										var allInputs = Ext.query('input[@name = "' + field.name + '"]');										for (var r = 0; r < allInputs.length; r++) {/*											extForm.add({												xtype: 'radio',												applyTo: allInputs[r]											});*/											var radio = new Ext.form.Radio({												applyTo: allInputs[r],												checked: allInputs[r].defaultChecked											});										}																					break;									case 'checkbox':										var allInputs = Ext.query('input[@name = "' + field.name + '"]');										for (var c = 0; c < allInputs.length; c++) {/*											extForm.add({												xtype: 'checkbox',												applyTo: allInputs[c]											});*/											var checkBoxLabel = 'test'; //allInputs[c].nextSibling.nodeValue;											var checkBox = new Ext.form.Checkbox({												applyTo: allInputs[c],												checked: allInputs[c].checked,												fieldLabel: 'test'											});										}										break;									default:										var comboField = new Ext.form.ComboBox ({											transform: dominoField										});								}								break;							case 'datetime':								if (field.timetype === 'time') {									var timeField = new Ext.form.TimeField({applyTo: dominoField});								} else if (field.timetype === 'date') {									var dateField = new Ext.form.DateField({applyTo: dominoField});								}								break;							case 'richtext':								var richTextField = new Ext.form.HtmlEditor({									applyTo: dominoField,									width: 640,									height: 240								});								break;							default:								var textField = new Ext.form.TextField ({applyTo: dominoField, style: 'width:100%', emptyText: field.description || ''});						}					} catch (e) {					}				}			}		}	});});
