5121 Posts in 1527 Topics by 1119 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1074 Views |
-
[solved] Displaying current value of TreeDropDown

10 February 2010 at 11:20pm Last edited: 11 February 2010 1:13am
How can I make the TreeDropDownField to display the currently selected item upon page load? It says "Choose..." even though a value for the field is set.
$tree = new TreeDropdownField('MyFile', 'Selected File', 'File', 'ID');
$tree->setTreeBaseID(3);$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', $tree, 'Content');Am I missing something or is there any workaround?
-
Re: [solved] Displaying current value of TreeDropDown

11 February 2010 at 1:13am Last edited: 11 February 2010 1:14am
My code was wrong. The field name MyFileID must be used instead of MyFile:
$tree = new TreeDropdownField('MyFileID', 'SelectedFile', 'File', 'ID');
| 1074 Views | ||
|
Page:
1
|
Go to Top |

