Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1003087 // htextinput - make HTML text input field. htextinput(name, [value,] autofocus := true, ...)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (4203L/24K).

// first element of params can be the value
static S htextinput(S name, O... params) {
  O value = "";
  if (odd(l(params))) {
    value = params[0];
    params = dropFirst(params);
  }
  params = html_massageAutofocusParam(params);
  ret tag("input", "", 
    concatArrays(new O[] {"type", "text", "name", name, "value", value}, params));
}

static S htextinput(S name) {
  ret htextinput(name, "");
}

Author comment

Began life as a copy of #1003086

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003087
Snippet name: htextinput - make HTML text input field. htextinput(name, [value,] autofocus := true, ...)
Eternal ID of this version: #1003087/9
Text MD5: 5b1b4ef7bff7bca3074363794c3e7263
Transpilation MD5: e9c82b9ac4bee6be850d2e52cb721504
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-24 18:57:17
Source code size: 416 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 685 / 769
Version history: 8 change(s)
Referenced in: [show references]