Skip to content

Associative options for a select #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brandom
Copy link

@brandom brandom commented Sep 5, 2013

Now we can pass an object to options if we would like a display value mapped to a database value for selects.

Example:

VARIABLE: {
    "name": "var",
    "display": "Enum",
    "type": "select",
    "multiple": true,
    "options": {
        "DB": "Database", "KEY": "Value", "DBVAL": "Display Val"
     }
}

@uded
Copy link
Collaborator

uded commented Sep 5, 2013

You just broke report types with database options.
I will test it, but you should rather do it via named array, like described here.

Let me test it, but I think it will not work.

@ghost ghost assigned uded Sep 5, 2013
@brandom
Copy link
Author

brandom commented Sep 5, 2013

Thanks for testing. I was unaware of the named array method, but it is a little verbose for my needs. Some of my filters provide 20+ options.

The code used in this commit actually works with both methods for a MySQL database. Please let me know if you discover any issues with other backends.

@uded
Copy link
Collaborator

uded commented Sep 7, 2013

OK, tested it and it breaks my AdoDB types since I was using purely the
named array as it was created in the first design.

I need to take a close look at this...

Pozdrawiam serdecznie,

:: Łukasz Rżanek

2013/9/6 brandom notifications@github.com

Thanks for testing. I was unaware of the named array method, but it is a
little verbose for my needs. Some of my filters provide 20+ options.

The code used in this commit actually works with both methods for a MySQL
database. Please let me know if you discover any issues with other backends.


Reply to this email directly or view it on GitHubhttps://github.com//pull/85#issuecomment-23905645
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants