![]() |
Random question time!
How do you get the name and the id of the creature to show in a drop down list? I can get one or the other to show, but not both. I used to know this but now I seemed to have forgot- It would be nice to know how to do it again, and even how to get it to show images would be awesome!
|
Image I don't know if it's possible, but to add the code next to the name I don't really remember how I did it, but I believe I just went to the dropdown list creation and instead of sending just the name i send the code concatenated with the name, like:
$nameFinal = $name .= '( ' .= $code .= ')' or something alike edit: I have this for females in the breeding thing PHP Code:
|
I can't seem to get it to work, I get this :
Adopt/Price:Cannot fill option objects inside this dropdownlist As an error, code: PHP Code:
|
I see, because you are using the fill function. In mine I add the options one by one to the dropdown list (called 'female'), so the left side is the field name and the right side the value. Try it like that?
|
I changed it to fill, but now it only shows one of the adoptables.
Updated code: PHP Code:
|
Oh, the add goes inside the the foreach cycle
|
Works now, awesome!
|
All times are GMT -5. The time now is 10:28 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.