7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Dropdownfield in DOM ?! Dropdown in Popup = Yes, Dropdown Content = No :(
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 992 Views |
-
Dropdownfield in DOM ?! Dropdown in Popup = Yes, Dropdown Content = No :(

30 July 2011 at 9:35am
Hi everyone,
i'm trying to build a "clients opinion" page, where clients can tell there opinion about a done project.
Now i got caught on the Dropdownfield in the DOM where you can choose the client and a person who's responsible for this project.
Booth of this Informations are stored in the ClientObject.My problem is, that the dropdown field didn't get the content from the clientobject :/
You should access the whole thing over the HomePage.
can someone help me out?
here's the code
OpinionObject.php -> http://pastie.org/2291897
ClientObject.php -> http://pastie.org/2291894
HomePage.php -> http://pastie.org/2291883THX
-
Re: Dropdownfield in DOM ?! Dropdown in Popup = Yes, Dropdown Content = No :(

2 August 2011 at 7:30am
No One ?
-
Re: Dropdownfield in DOM ?! Dropdown in Popup = Yes, Dropdown Content = No :(

2 August 2011 at 2:17pm
I'm unclear on what you're trying to do.. You didn't have any has_one relations set up for those drop downs.. you still have a has_many that isn't being used.. but this should at least get you started.
-
Re: Dropdownfield in DOM ?! Dropdown in Popup = Yes, Dropdown Content = No :(

3 August 2011 at 2:30am
Thx for the help.
I'll do the rest later @home. After Testing it i'll report my result
-
Re: Dropdownfield in DOM ?! Dropdown in Popup = Yes, Dropdown Content = No :(

3 August 2011 at 9:35am Last edited: 3 August 2011 10:39pm
Thx that works
but what if i got 2 dropdowns?
can i do it like this than:
public function getCMSFields_forPopup() {
$map = array();
if($set = DataObject::get("ClientObject")) {
$map = $set->toDropdownMap('ID','Name');$map2 = array();
if($set2 = DataObject::get("OtherObject")) {
$map2 = $set2->toDropdownMap('ID','Other');
} -
Re: Dropdownfield in DOM ?! Dropdown in Popup = Yes, Dropdown Content = No :(

4 August 2011 at 1:55am
Yup!
-
Re: Dropdownfield in DOM ?! Dropdown in Popup = Yes, Dropdown Content = No :(

4 August 2011 at 2:10am
so
$map and $set are just variables which i can rename however i want ? -
Re: Dropdownfield in DOM ?! Dropdown in Popup = Yes, Dropdown Content = No :(

4 August 2011 at 6:06am
Yup!
| 992 Views | ||
| Go to Top | Next > |

