Libraryless. Click here for Pure Java version (3257L/18K).
// grabs only the specified keys from the map.
sS hiddenFields(SS map, Cl<S> keys) {
new StringBuilder buf;
for (S key : keys) {
S value = map.get(key);
if (!empty(value))
buf.append(htag("input", "", "type", "hidden", "name", key, "value", value) + "\n");
}
ret str(buf);
}
sS hiddenFields(SS map, S... keys) {
ret hiddenFields(map, asList(keys));
}download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1002388 |
| Snippet name: | hiddenFields - make HTML hidden fields |
| Eternal ID of this version: | #1002388/2 |
| Text MD5: | 4b9d3843473029520a5a32e4afeb53b7 |
| Transpilation MD5: | 314ba01a5ae0d8ac6054d9652384c33f |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-08-14 04:54:41 |
| Source code size: | 388 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1102 / 1514 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |