Index: CKEditor/trunk/_source/plugins/forms/dialogs/hiddenfield.js
===================================================================
--- CKEditor/trunk/_source/plugins/forms/dialogs/hiddenfield.js	(revision 5263)
+++ CKEditor/trunk/_source/plugins/forms/dialogs/hiddenfield.js	(revision 5264)
@@ -1,3 +1,3 @@
-/*
+﻿/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -7,5 +7,4 @@
 	return {
 		title : editor.lang.hidden.title,
-		hiddenField : null,
 		minWidth : 350,
 		minHeight : 110,
@@ -14,38 +13,27 @@
 			delete this.hiddenField;
 
-			var editor = this.getParentEditor(), 
-			selection = editor.getSelection(), 
-			element = selection.getSelectedElement(); 
-	                         
-	        if ( element && element.getAttribute( '_cke_real_element_type' ) && element.getAttribute( '_cke_real_element_type' ) == 'hiddenfield' ) 
-            { 
-				this.hiddenField = element; 
-				element = editor.restoreRealElement( this.hiddenField ); 
+			var element = this.getParentEditor().getSelection().getSelectedElement();
+			if ( element && element.getName() == "input" && element.getAttribute( 'type' ) == "checkbox" )
+			{
+				this.hiddenField = element;
 				this.setupContent( element );
-				selection.selectElement( this.hiddenField ); 
-	        } 
+			}
 		},
 		onOk : function()
 		{
-			var name = this.getValueOf( 'info', '_cke_saved_name' ), 
-				value = this.getValueOf( 'info', 'value' ), 
-				editor = this.getParentEditor(), 
-				element = CKEDITOR.env.ie ?
-					editor.document.createElement( '<input name="' + CKEDITOR.tools.htmlEncode( name ) + '">' ) :
-						editor.document.createElement( 'input' );
+			var editor,
+				element = this.hiddenField,
+				isInsertMode = !element;
 
-			element.setAttribute( 'type', 'hidden' ); 
+			if ( isInsertMode )
+			{
+				editor = this.getParentEditor();
+				element = editor.document.createElement( 'input' );
+				element.setAttribute( 'type', 'hidden' );
+			}
+
+			if ( isInsertMode )
+				editor.insertElement( element );
 			this.commitContent( element );
-			var fakeElement = editor.createFakeElement( element, 'cke_hidden', 'hiddenfield' ); 
-			
-			if ( !this.hiddenField ) 
-				editor.insertElement( fakeElement ); 
-			else 
-			{ 
-				fakeElement.replace( this.hiddenField ); 
-				editor.getSelection().selectElement( fakeElement );
-            }
-			
-			return true; 
 		},
 		contents : [
@@ -63,5 +51,4 @@
 						setup : function( element )
 						{
-							
 							this.setValue(
 									element.getAttribute( '_cke_saved_name' ) ||
@@ -72,7 +59,8 @@
 						{
 							if ( this.getValue() )
-								element.setAttribute( 'name', this.getValue() );
+								element.setAttribute( '_cke_saved_name', this.getValue() );
 							else
 							{
+								element.removeAttribute( '_cke_saved_name' );
 								element.removeAttribute( 'name' );
 							}
Index: CKEditor/trunk/_source/plugins/forms/plugin.js
===================================================================
--- CKEditor/trunk/_source/plugins/forms/plugin.js	(revision 5263)
+++ CKEditor/trunk/_source/plugins/forms/plugin.js	(revision 5264)
@@ -19,16 +19,5 @@
 				'border: 1px dotted #FF0000;' +
 				'padding: 2px;' +
-			'}\n' );
-			
-		editor.addCss(
-			'img.cke_hidden' +
-			'{' +
-				'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/hiddenfield.gif' ) + ');' +
-				'background-position: center center;' +
-				'background-repeat: no-repeat;' +
-				'border: 1px solid #a9a9a9;' +
-				'width: 16px;' +
-				'height: 16px;' +
-			'}' );	
+			'}' );
 
 		// All buttons use the same code to register. So, to avoid
@@ -177,8 +166,4 @@
 	afterInit : function( editor )
 	{
-		var dataProcessor = editor.dataProcessor, 
-				htmlFilter = dataProcessor && dataProcessor.htmlFilter, 
-				dataFilter = dataProcessor && dataProcessor.dataFilter;
-				
 		// Cleanup certain IE form elements default values.
 		if ( CKEDITOR.env.ie )
@@ -201,23 +186,6 @@
 			} );
 		}
-		
-		if ( dataFilter ) 
-		{ 
-			dataFilter.addRules( 
-			{ 
-				elements : 
-				{ 
-					input : function( element ) 
-					{ 
-						if ( element.attributes.type == 'hidden' ) { 
-								return editor.createFakeParserElement( element, 'cke_hidden', 'hiddenfield' ); 
-						} 
-					} 
-				} 
-			} ); 
-		} 
 	},
-	
-	requires : [ 'image', 'fakeobjects' ]
+	requires : [ 'image' ]
 } );
 
