View Single Post
  #3  
Old 09-27-2014, 02:17 PM
FounderSim FounderSim is offline
Member
 
Join Date: Sep 2014
Posts: 65
Gender: Male
Credits: 10,845
FounderSim is on a distinguished road
Default

Quote:
Originally Posted by FounderSim View Post
Code:
		$petField->add(new DropDownList("adopt", "AdoptTypeList"));
seems to work for anyone who needs the answer

=)

Back again.. It doesn't work afterall. It just displays an empty "drop down list".

How do I get the drop down list with my contents using the more simple version of the form building?

or do I have to go about the more complicated way as seen in other files?

like this way:

sniplet from breedingview.php
Code:
		$settingsForm->buildComment("Breeding System Enabled:   ", FALSE)->buildRadioList("system", $breedingSystem, $breedingSettings->system)
					 ->buildComment("Breeding Method(heuristic or advanced):   ", FALSE)->buildRadioList("method", $breedingMethod, $breedingSettings->method)
					 ->buildComment("Ineligible Species(separate by comma):   ", FALSE)->buildTextField("species", ($breedingSettings->species)?implode(",", $breedingSettings->species):"")
		             ->buildComment("Interval/wait-time(days) between successive attempts:	 ", FALSE)->buildTextField("interval", $breedingSettings->interval)
					 ->buildComment("Minimum Level Requirement:	 ", FALSE)->buildTextField("level", $breedingSettings->level)
Reply With Quote