var inputs = $fields ?? [ ];
var button = $button ?? 'Ok';
var channel = $publish ?? 'default';
<form>
<table id=(@form)>
foreach(var input in inputs where !input.hidden) {
<tr>
<td> input.label ?? string.nbsp </td>
<td><input type="text" name=(input.field) value=(input.value) size=(input.size ?? 16)/></td>
</tr>
}
<tr>
<td>
foreach(var input in inputs where input.hidden) {
<input type="hidden" name=(input.field) value=(input.value)/>
}
</td>
<td align="right">
<input type="button" value=(button ?? 'Ok') ctor="when($this.click) {
var m = { };
Deki.$('#' + {{@form}}).find('input').each(function() {
if(Deki.hasValue(this.name)) m[this.name] = Deki.$(this).val();
});
Deki.publish({{channel}}, m);
}"/>
</td>
</tr>
</table>
</form>
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by
Shame on me !
anyway, i added some lines to allow select input types...
http://developer.mindtouch.com/index.php?title=Template:ShowForm&action=diff&revision=6&diff=7 edited 07:12, 6 Aug 2009