Libraryless. Click here for Pure Java version (3257L/18K).
1 | // grabs only the specified keys from the map. |
2 | sS hiddenFields(SS map, Cl<S> keys) {
|
3 | new StringBuilder buf; |
4 | for (S key : keys) {
|
5 | S value = map.get(key); |
6 | if (!empty(value)) |
7 | buf.append(htag("input", "", "type", "hidden", "name", key, "value", value) + "\n");
|
8 | } |
9 | ret str(buf); |
10 | } |
11 | |
12 | sS hiddenFields(SS map, S... keys) {
|
13 | ret hiddenFields(map, asList(keys)); |
14 | } |
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: | 890 / 1311 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |