As FCKEditor uses ID for field detection, and ID cannot contain [] chars (good if you want to exploit PHP's automatic array creation), I have made the following small patch to allow defining the name value for the value form element and ID separately:
You can set $fck->FieldName to differ from the ID value.
You can set $fck->FieldName to differ from the ID value.
--- old-fck/fckeditor_php5.php 2008-09-24 13:29:20.000000000 +0300 +++ new-fck/fckeditor_php5.php 2008-09-24 13:28:35.000000000 +0300 @@ -122,6 +122,12 @@ public $Config ; /** + * Defines the name used for the submit value + * @var string + */ + public $FieldName; + + /** * Main Constructor. * Refer to the _samples/php directory for examples. * @@ -130,6 +136,7 @@ public function __construct( $instanceName ) { $this->InstanceName = $instanceName ; + $this->FieldName = $instanceName ; $this->BasePath = '/fckeditor/' ; $this->Width = '100%' ; $this->Height = '200' ; @@ -172,7 +179,7 @@ $Link .= "&Toolbar={$this->ToolbarSet}" ; // Render the linked hidden field. - $Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" style=\"display:none\" />" ; + $Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->FieldName}\" value=\"{$HtmlValue}\" style=\"display:none\" />" ; // Render the configurations hidden field. $Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\" style=\"display:none\" />" ;
Re: Small patch to allow input name defining