Index: /CKEditor/branches/prototype/_source/plugins/forms/dialogs/checkbox.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/forms/dialogs/checkbox.js	(revision 2696)
+++ /CKEditor/branches/prototype/_source/plugins/forms/dialogs/checkbox.js	(revision 2697)
@@ -21,4 +21,14 @@
 CKEDITOR.dialog.add( 'checkbox', function( editor )
 {
+	var addChange = function( name, input ){
+		var dialog = input.getDialog();
+		if( input.isChanged() || ( dialog.editMode == false && input.getValue() != '' ))
+		{
+			dialog.changedAttibutes[ name ] = input.getValue();
+			return true;
+		}
+		return false;
+	};
+
 	return {
 		title : editor.lang.checkboxProp,
@@ -28,14 +38,35 @@
 		onOk: function( data )
 		{
+			this.changedAttibutes[ 'type' ] = 'checkbox';
+			
+			for( var name in this.changedAttibutes )
+			{
+				this.editObj.setAttribute(name, this.changedAttibutes[ name ] );
+			}
+			
+			if( this.editMode == false )
+			{
+				editor.insertElement( this.editObj );
+			}
 			return true;
 		},
-
 		onCancel: function()
 		{
 		},
-		
-		onLoad: function( data )
+		onShow: function()
 		{
-			return true;
+			this.editMode = false;
+			
+			/*
+			Check selection.
+			Fill this.editObj if the BUTTON element is selected.
+			*/
+			
+			if( this.editMode == false )	//New object.
+			{
+				this.editObj = editor.document.createElement( 'input' );
+			}
+			
+			this.changedAttibutes = new Array();
 		},
 		contents : [
@@ -54,4 +85,5 @@
 						validate: function( data )
 						{
+							addChange( 'name', this );
 							return true;
 						}
@@ -65,4 +97,5 @@
 						validate: function( data )
 						{
+							addChange( 'value', this );
 							return true;
 						}
@@ -76,4 +109,5 @@
 						validate: function( data )
 						{
+							addChange( 'selected', this );
 							return true;
 						}
Index: /CKEditor/branches/prototype/_source/plugins/forms/dialogs/hiddenfield.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/forms/dialogs/hiddenfield.js	(revision 2696)
+++ /CKEditor/branches/prototype/_source/plugins/forms/dialogs/hiddenfield.js	(revision 2697)
@@ -21,4 +21,14 @@
 CKEDITOR.dialog.add( 'hiddenfield', function( editor )
 {
+	var addChange = function( name, input ){
+		var dialog = input.getDialog();
+		if( input.isChanged() || ( dialog.editMode == false && input.getValue() != '' ))
+		{
+			dialog.changedAttibutes[ name ] = input.getValue();
+			return true;
+		}
+		return false;
+	};
+
 	return {
 		title : editor.lang.hiddenFieldProp,
@@ -28,14 +38,34 @@
 		onOk: function( data )
 		{
+			this.changedAttibutes[ 'type' ] = 'hidden';
+			for( var name in this.changedAttibutes )
+			{
+				this.editObj.setAttribute(name, this.changedAttibutes[ name ] );
+			}
+
+			if( this.editMode == false )
+			{
+				editor.insertElement( this.editObj );
+			}
 			return true;
 		},
-
 		onCancel: function()
 		{
 		},
-		
-		onLoad: function( data )
+		onShow: function()
 		{
-			return true;
+			this.editMode = false;
+			
+			/*
+			Check selection.
+			Fill this.editObj if the BUTTON element is selected.
+			*/
+			
+			if( this.editMode == false )	//New object.
+			{
+				this.editObj = editor.document.createElement( 'input' );
+			}
+			
+			this.changedAttibutes = new Array();
 		},
 		contents : [
@@ -54,4 +84,5 @@
 						validate: function( data )
 						{
+							addChange( 'name', this );
 							return true;
 						}
@@ -65,4 +96,5 @@
 						validate: function( data )
 						{
+							addChange( 'value', this );
 							return true;
 						}
Index: /CKEditor/branches/prototype/_source/plugins/forms/dialogs/radio.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/forms/dialogs/radio.js	(revision 2696)
+++ /CKEditor/branches/prototype/_source/plugins/forms/dialogs/radio.js	(revision 2697)
@@ -21,4 +21,14 @@
 CKEDITOR.dialog.add( 'radio', function( editor )
 {
+	var addChange = function( name, input ){
+		var dialog = input.getDialog();
+		if( input.isChanged() || ( dialog.editMode == false && input.getValue() != '' ))
+		{
+			dialog.changedAttibutes[ name ] = input.getValue();
+			return true;
+		}
+		return false;
+	};
+
 	return {
 		title : editor.lang.radioButtonProp,
@@ -28,14 +38,35 @@
 		onOk: function( data )
 		{
+			this.changedAttibutes[ 'type' ] = 'radio';
+			
+			for( var name in this.changedAttibutes )
+			{
+				this.editObj.setAttribute(name, this.changedAttibutes[ name ] );
+			}
+			
+			if( this.editMode == false )
+			{
+				editor.insertElement( this.editObj );
+			}
 			return true;
 		},
-
 		onCancel: function()
 		{
 		},
-		
-		onLoad: function( data )
+		onShow: function()
 		{
-			return true;
+			this.editMode = false;
+			
+			/*
+			Check selection.
+			Fill this.editObj if the BUTTON element is selected.
+			*/
+			
+			if( this.editMode == false )	//New object.
+			{
+				this.editObj = editor.document.createElement( 'input' );
+			}
+			
+			this.changedAttibutes = new Array();
 		},
 		contents : [
@@ -54,4 +85,5 @@
 						validate: function( data )
 						{
+							addChange( 'name', this );
 							return true;
 						}
@@ -65,4 +97,5 @@
 						validate: function( data )
 						{
+							addChange( 'value', this );
 							return true;
 						}
@@ -76,4 +109,5 @@
 						validate: function( data )
 						{
+							addChange( 'selected', this );
 							return true;
 						}
Index: /CKEditor/branches/prototype/_source/plugins/forms/dialogs/textfield.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/forms/dialogs/textfield.js	(revision 2696)
+++ /CKEditor/branches/prototype/_source/plugins/forms/dialogs/textfield.js	(revision 2697)
@@ -21,4 +21,14 @@
 CKEDITOR.dialog.add( 'textfield', function( editor )
 {
+	var addChange = function( name, input ){
+		var dialog = input.getDialog();
+		if( input.isChanged() || ( dialog.editMode == false && input.getValue() != '' ))
+		{
+			dialog.changedAttibutes[ name ] = input.getValue();
+			return true;
+		}
+		return false;
+	};
+
 	return {
 		title : editor.lang.textFieldProp,
@@ -28,14 +38,33 @@
 		onOk: function( data )
 		{
+			for( var name in this.changedAttibutes )
+			{
+				this.editObj.setAttribute(name, this.changedAttibutes[ name ] );
+			}
+			
+			if( this.editMode == false )
+			{
+				editor.insertElement( this.editObj );
+			}
 			return true;
 		},
-
 		onCancel: function()
 		{
 		},
-		
-		onLoad: function( data )
+		onShow: function()
 		{
-			return true;
+			this.editMode = false;
+			
+			/*
+			Check selection.
+			Fill this.editObj if the BUTTON element is selected.
+			*/
+			
+			if( this.editMode == false )	//New object.
+			{
+				this.editObj = editor.document.createElement( 'input' );
+			}
+			
+			this.changedAttibutes = new Array();
 		},
 		contents : [
@@ -59,4 +88,5 @@
 								validate: function( data )
 								{
+									addChange( 'name', this );
 									return true;
 								}
@@ -70,4 +100,5 @@
 								validate: function( data )
 								{
+									addChange( 'value', this );
 									return true;
 								}
@@ -97,4 +128,5 @@
 											return false;
 										}
+										addChange( 'width', this );
 									}
 									return true;
@@ -118,4 +150,5 @@
 											return false;
 										}
+										addChange( 'maxlength', this );
 									}
 									return true;
@@ -137,4 +170,5 @@
 						validate: function( data )
 						{
+							addChange( 'type', this );
 							return true;
 						}
