Index: formdat.scm ================================================================== --- formdat.scm +++ formdat.scm @@ -33,11 +33,17 @@ (define (formdat:initialize self) (formdat:formdat-set-data! self (make-hash-table))) (define (formdat:get self key) - (hash-table-ref/default (formdat:formdat-get-data self) key #f)) + (hash-table-ref/default + (formdat:formdat-get-data self) + (cond + ((symbol? key) key) + ((string? key) (string->symbol key)) + (else key)) + #f)) ;; change to convert data to list and append val if already exists ;; or is a list (define (formdat:set! self key val) (let ((prev-val (formdat:get self key)) Index: session.scm ================================================================== --- session.scm +++ session.scm @@ -730,10 +730,20 @@ (formdat:get formdat key) (begin (session:log self "ERROR: formdat: " formdat " is not of class ") #f)) (session:log self "ERROR: bad key " key))))) + +;; This one will get the first value found regardless of form +(define (session:get-input-keys self) + (let* ((formdat (sdat-get-formdat self))) + (if (not formdat) #f + (if (and (vector? formdat)(eq? (vector-length formdat) 1)(hash-table? (vector-ref formdat 0))) + (formdat:keys formdat) + (begin + (session:log self "ERROR: formdat: " formdat " is not of class ") + #f))))) (define (session:run-actions self) (let* ((action (session:get-param self 'action)) (page (sdat-get-page self))) ;; (print "action=" action " page=" page) Index: setup.scm ================================================================== --- setup.scm +++ setup.scm @@ -89,10 +89,13 @@ ;; inputs ;; (define (s:get-input key) (session:get-input s:session key)) +(define (s:get-input-keys) + (session:get-input-keys s:session)) + (define (s:load-model model) (session:load-model s:session model)) (define (s:model-path model) (session:model-path s:session model))