Grrr, there was still debug code in that snipped. How clumsy! Here's it again without the extra <:ai call.<br><br>(defclass multiple-select-field (select-field)<br> ()<br> (:default-initargs :name (random-string 8) :client-value ()))
<br><br>(defmethod render ((field multiple-select-field))<br> (<:input :type "hidden" :value "x"
<br> :name (make-new-callback<br> (lambda (value)<br> (declare (ignore value))<br> (do ((vars (slot-value (context.request *context*) 'parameters) (cdr vars))
<br> (result ()))<br> ((null vars) (setf (client-value field) result))<br> (if (string= (caar vars) (name field))<br> (push (cdar vars) result))))))
<br> (<:select :name (name field) :tabindex (tabindex field) :multiple t<br> (setf (data-map field) (build-data-map field))<br> (render-options field)))<br><br>(defmethod render-options ((field multiple-select-field))
<br> (dolist* ((key-string . value) (data-map field))<br> (<:option :value key-string<br> :selected (member key-string (client-value field) :test #'string=)<br> (render-value field value))))
<br><br>(defmethod value ((field multiple-select-field))<br> (mapcar (lambda (x)<br> (cdr (assoc x (data-map field) :test #'string=)))<br> (client-value field)))<br><br>