Opened 7 years ago

Closed 7 years ago

#5753 closed Bug (fixed)

select dialog default for txtName Id not working...

Reported by: shawnmelliott Owned by: Saare
Priority: Normal Milestone: CKEditor 3.4.1
Component: UI : Dialogs Version: 3.2.1
Keywords: Cc:


The following code is used to enter a default "Name" for radio, checkbox, textareas, textfields and selects. I'm able to set the default name for all of these except for "select" even if I'm using the ID of the name uielement

When I work with any of the other inputs listed the "Name:" item does have the default value of $qst$_Question added.. but this isn't the case for the select. To verify I edited the dialogs select.js and stuffed a default for the name uielement, it didn't take the default I specified as the name.

CKEDITOR.on( 'dialogDefinition', function( ev ){

var dialogName =; var dialogDefinition =;

if(dialogName == 'checkbox'
dialogName == 'radio' dialogName == 'textfield' dialogName == 'textarea' dialogName == 'select'){

Get the info contents var defTag = dialogDefinition.getContents( 'info' );

Now get our "name" item and default it based on type var useID=;

if(dialogName == 'checkbox'
dialogName == 'select'){useID='txtName';}

if(dialogName == 'radio'){useID='name';}

if(dialogName == 'textfield'
dialogName == 'textarea'){useID='_cke_saved_name';}

if(dialogName == 'select'){useID='txtName';}

Have one? if(useID != ){

Yes.. get it var fldItem = defTag.get( useID ); if(fldItem){

fldItem[ 'default' ] = '$qst$_Question';





Attachments (1)

5753.patch (862 bytes) - added by Saare 7 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by fredck

  • Keywords select name default removed
  • Milestone set to CKEditor 3.5

comment:2 Changed 7 years ago by Saare

  • Owner set to Saare
  • Status changed from new to assigned

Changed 7 years ago by Saare

comment:3 Changed 7 years ago by Saare

  • Status changed from assigned to review

comment:4 Changed 7 years ago by tobiasz.cudnik

  • Status changed from review to review_passed

comment:5 Changed 7 years ago by Saare

  • Resolution set to fixed
  • Status changed from review_passed to closed

Fixed with [5836].

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy