diff --git a/source/clog-form.lisp b/source/clog-form.lisp index 7b5f7ba..80bd600 100644 --- a/source/clog-form.lisp +++ b/source/clog-form.lisp @@ -465,6 +465,18 @@ be unique name on entire document.")) (clog-connection:query (connection-id obj) (format nil "$('select[name=~A] option:selected').val()" name))) +;;;;;;;;;;;;;;;; +;; textarea-value ;; +;;;;;;;;;;;;;;;; + +(defgeneric textarea-value (clog-obj name) + (:documentation "Returns the value of textarea item called NAME and must +be unique name on entire document.")) + +(defmethod textarea-value ((obj clog-obj) name) + (clog-connection:query (clog::connection-id obj) + (format nil "$('textarea#~A').val()" name))) + ;;;;;;;;;;;;;;;; ;; name-value ;; ;;;;;;;;;;;;;;;; diff --git a/source/clog-gui.lisp b/source/clog-gui.lisp index c9eb165..9b11b5d 100644 --- a/source/clog-gui.lisp +++ b/source/clog-gui.lisp @@ -1614,6 +1614,7 @@ Calls on-input with t if confirmed or nil if canceled." (cancel-text "Cancel") (left nil) (top nil) (width 400) (height 500) + (size 40) (rows 4) (client-movement nil) (html-id nil)) "Create a form dialog box with CONTENT followed by FIELDS. @@ -1632,10 +1633,13 @@ Special field types :checkbox t if checked :radiobox a-list ((label name)) a third value can be added \"checked\" :select a-list ((label name)) a third value can be added \"selected\" + :textarea value :text value (any text input types also work :email, :tel, etc. see FORM-ELEMENT-TYPE) +The size of any texarea field is controled by the size and rows parameters + Calls on-input after OK or Cancel with an a-list of field name to value if confirmed or nil if canceled." (unless html-id @@ -1666,17 +1670,17 @@ if confirmed or nil if canceled." (format nil "~{~A~}" (mapcar (lambda (s) (format nil - "