7607 Posts in 1236 Topics by 846 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » SimpleTreeDropdownField optional?
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 503 Views |
-
SimpleTreeDropdownField optional?

12 March 2010 at 5:19am
Hi,
I am using SimpleTreeDropdownField within DOM.
Is there a way not to select a page? I want to make the selection optional but the homepage is alway selected per default.
Thanks much
patte
-
Re: SimpleTreeDropdownField optional?

12 March 2010 at 5:30am
$myDropdown->setEmptyString('-- Please select --');
-
Re: SimpleTreeDropdownField optional?

12 March 2010 at 5:42am
Thanks for your help UncleCheese
Can you please give me another hint where to place setEmptyString?
public function getCMSFields_forPopup()
{
return new FieldSet(
new SimpleTreeDropdownField("MyUrlID", "Bitte waehlen Sie das Ziel aus", "SiteTree")
);
} -
Re: SimpleTreeDropdownField optional?

12 March 2010 at 6:03am
public function getCMSFields_forPopup()
{
$f = new FieldSet(
$dropdown = new SimpleTreeDropdownField("MyUrlID", "Bitte waehlen Sie das Ziel aus", "SiteTree")
);
$dropdown->setEmptyString(...);
return $f;
} -
Re: SimpleTreeDropdownField optional?

12 March 2010 at 10:14pm
UncleCheese, you`re the best! Thanks much
| 503 Views | ||
|
Page:
1
|
Go to Top |

