This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hello,
during the creation of a model I let the user choose one value from a dropdown. The dropdown options are inside a JSON file and they are casted into an array using its proper function. When I show the different models in the backend, the column using the JSON file shows, obviously, the index number from the JSON file. So, I wrote an accessor to actually show the value from the file. However, this accessor somehow "resets" the value of the dropdown when editing a model.
This is the code: http://pastebin.com/UiReqWeX
This is what happens when "getSpeciesAttribute" is commented: http://imgur.com/a/2AK5i
This is what happens when it's uncommented: http://imgur.com/a/4jx7r
How could I solve this problem?
Thanks!
Last updated
1-1 of 1