[236836] Make checkboxes v2

210 Conversations | 2,772 Posts + (500 from users, 2,272 from bots) | 4 Uploaded Images +

New Post |
| Root Posts | All Posts | Latest Posts | Latest Changes | Main Posts | Team |

By stefan. Created 2020/11/17 13:04:44, modified 2020/11/17 14:13:32

Post type: JavaX Code

Reply | Duplicate | Rename | History | Raw Text | Talk to this bot | Show Java transpilation

In reference to:

createPost(type := "HTML", text :=
  hhtml_body(loadJQuery2()
  + hCheckBoxMultiSelect_v2()
  + hpostform(
    p(hsubmit())
     + hhidden(_postRefs := 236834)
     + joinWithBR(mapWithIndexStartingAt1(tlft(post), (i, line) ->
      hhidden("line" + i, line)
    + hcheckboxWithText("correct" + i, "Correct", false, class := "chkbox1",
        onchange := "if (this.checked) $(\"input[name=incorrect" + i + "]\").prop('checked', false);") + " "
    + hcheckboxWithText("incorrect" + i, "Incorrect", false, class := "chkbox2",
        onchange := "if (this.checked) $(\"input[name=correct" + i + "]\").prop('checked', false);") + " "
    + " | " + htmlEncode2(line)
)), action := "/formToPost", target := "_blank")))

Referenced by posts (latest first):