Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 12-29-2014, 06:54 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 22,989
IntoRain is on a distinguished road
Default

Quote:
Originally Posted by Abronsyth View Post
It's driving me nuts, haha XD ((Took my 6 months to learn html and css, taken me 3+ years and still haven't learned php...someday I'll be able to solve these issues. Soooome day.)).
Haha php is a whole programming language, it's normal to take longer to learn! You gotta go step by step

In this part:

Inventoryview.php
PHP Code:
$adoptable->add(new Option($adopt->getValue(), $adopt->getKey())); 
Do you have any idea why the value and the key are inverted? It's basically creating an option with the text shown to the user as $adopt->getValue() (the adoptable's id) and the text sent to the server as $adopt->getKey() (the adoptable's name).
Doing this should fix it:

PHP Code:
//to show the id
$adoptable->add(new Option($adopt->getValue(), $adopt->getValue()));

//or to show the name instead
$adoptable->add(new Option($adopt->getKey(), $adopt->getValue())); 
But I don't know why it was inverted in the first place, so I don't know if there's any other system associated with that that might break...
__________________


asp.net stole my soul.

Last edited by IntoRain; 12-29-2014 at 06:58 PM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mys v1.3.4 Item Shop Mod(s): NPC + Item Display + Tooltips Kyttias Mys v1.3.x Mods 55 06-19-2020 11:21 AM
Creating a drop down list within FORM to SHOW FounderSim Questions and Supports 6 09-27-2014 04:39 PM
Too many drop down bars? Infernette Questions and Supports 4 01-29-2013 04:01 PM
HTML Drop-down Menu Knyfe Tutorials and Tips 2 02-17-2011 04:03 PM


All times are GMT -5. The time now is 07:32 PM.

Currently Active Users: 2643 (0 members and 2643 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636