+function show_in_listing($type, $input, $format, $sql) {
+ switch($input) {
+ case 'submit':
+ case 'hidden':
+ case 'password':
+ case 'textarea':
+ case 'html':
+ case 'fieldset':
+ case 'end_fieldset':
+ return false;
+ }
+ if($type == 'image') {
+ return false;
+ }
+
+ return true;
+}
+
+function pulldown_options_array($options) {
+ if($options) {
+ $pulldown_options = array();
+ foreach($options as $option) {
+ $option = preg_replace("/['\\\\]/", '\\\\$0', $option);
+ $pulldown_options[] = "'$option'";
+ }
+ $pulldown_options = 'array(' . join(', ', $pulldown_options) . ')';
+ } else {
+ $pulldown_options = "array(array('op1', 'Option One'), array('op2', 'Option Two'), 'n/a')";
+ }
+
+ return $pulldown_options;
+}