projects
/
infodrom
/
hallinta
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a7af02
)
Allow default values for text input fields
author
Joey Schulze
<joey@infodrom.org>
Fri, 4 Mar 2011 18:26:45 +0000
(19:26 +0100)
committer
Joey Schulze
<joey@infodrom.org>
Fri, 4 Mar 2011 18:26:45 +0000
(19:26 +0100)
lib/mask.php
patch
|
blob
|
history
diff --git
a/lib/mask.php
b/lib/mask.php
index
951347d
..
621330e
100644
(file)
--- a/
lib/mask.php
+++ b/
lib/mask.php
@@
-49,6
+49,7
@@
function build_form($name, $mask)
'name="'.$id.'"');
$v[] = 'size="'.(empty($info['size'])?'10':$info['size']).'"';
$v[] = 'type="'.($info['type']=='passwd'?'password':'text').'"';
+ $v[] = 'value="'.(empty($info['default'])?'':$info['default']).'"';
$ret[] = sprintf('<label for="edit_%s">%s</label><br>', $id, $info['name']);
$ret[] = sprintf('<input %s>', implode(' ', $v));
} elseif ($info['type'] == 'date') {