php-reports
php-reports copied to clipboard
Key Value options
Hi @jdorn
In my database table, I have a few columns that have non-descript names (e.g "fname", "lname"). My report will ideally allow a user to choose which column to query against. I want them to have labels like "First Name" and "Last Name" but still be able to run my query against their actual column name. I was thinking I could do a select variable header and have my options by an array like [{"key":"fname","value":"First Name"}] but this didn't work (the dropdown appeared blank). Any ideas on how to make this work?
options: [{display:"ok", value:"1"},{display:"anulowany", value:"3"}]
This example should be added to project documentation because project documentation is useless regarding this issue (options with key value pairs).