From: Emmett B. <ch...@be...> - 2003-03-06 18:38:26
|
Developers, Would you consider putting id= tags for each question so that javascripts can get and put data to the forms? Javascript labels must start with alphabetical characters and the $qid's are numerical. This would help entering dates and times since respondents could just click a calendar icon next to the form and a javascript could display graphical calendar for the date submission. I've done this for mktext(...) in lib/esphtml.forms.inc and it looks like this: function mktext ($_name, $size = 20, $max = 0, $varr = null) { if ($varr == null) $varr =& $GLOBALS['HTTP_POST_VARS']; $size = intval($size); $max = intval($max); $str = "size=\"$size\""; $id = "id=\"id${_name}\""; // <------ new id tag if ($max) $str .= " maxlength=\"$max\""; if (isset($varr[$_name])) return('<input type="text" '. $str .' name="'. htmlspecialchars($_name) .'" value="'. htmlspecialchars($varr[$_name]) .'"'. $id .' />'); return('<input type="text" '. $str .' name="'. htmlspecialchars($_name) .'"'. $id .' />'); } eb. |