dereknorrbom
Forum Replies Created
-
actually i think i got something working. Might have answered my own question, this appears to be working.
global $wpdb; $values = array(); $valueLabel = array(); $attachments = $wpdb->get_results('select * from bn_bundles order by bundle asc'); foreach ($attachments as $attachment) { $str = '[' . $attachment->bundle . ']'; $str2 = '[' . $attachment->sku . ']'; $values[] = $str ; $valueLabel[] = $str2 ; }Hi proximity2008,
no idea if this will get to you but i am trying to do something similar. I want to populate a select box (drop down) using CFT’s “experimental php code” with a array of bundles as the valuelabel, and an array of sku’s of the bundles as the value. Im still learning when it comes to php so any help is super appreciated.
Basically i have a db table called bn_bundles, and in that table is a column called bundle, and a column called sku. I just dont know how to plug that into something that CFT could use.
The idea is someone can select from a drop down which bundle they want to display.
They are presented with the bundle names to choose from, but the value i want to pass to the page is the sku.Thank you for taking time to read this.
awesome, thanks for the reply. and again, love the plugin. thank you for your contributions