Save checkbox input in offline HTML

105 Views Asked by At

I am working on a project in R where I export a resulting dataset into HTML format that is saved on dropbox or goole drive, then the team members have to review each particular row and mark it if it meets criteria. Each member will be working on their own copy of the HTML file.

I have very little experience with HTML files, but I was able to generate an output using the r code below. This results has a column with a check box for each row. The problem is that it does not save the user's choice, ie when I refresh or reopen the file, I do not see the choice I already made. I understand that this likely will need a more complex html coding (if even doable without placing this html on a website).

I thought about just exporting into pdf or something and the user can save after review, but I still want to try with HTML as the resulting document can be viewed without any pdf reader installed and will fit the width to whatever device / screen size used.

was hoping I can find some guidance on where to go from there.

Thank you

library(tableHTML)

name = c("wiki", "google")
link = c("https://en.wikipedia.org/wiki/Main_Page", "https://www.google.com/")

df = data.frame(name, link)

df$link2 = paste('<a href="', df$link, '" target="_blank">', df$name, '</a>', sep="")

df$check = '<input type="checkbox" id="v1" name="v1" value="checked">
  <label for="vehicle1"> Mark</label>'

df$link = NULL
tableHTML::write_tableHTML(tableHTML(df, escape = F), file = "df.html") 

0

There are 0 best solutions below