Skip to content

set_values cannot modify input checkboxes #127

@dbuijs

Description

@dbuijs

In looking at the code for the set_values function, it doesn't seem to be able to handle changing the checked attribute of input checkboxes. It also doesn't throw any errors if you try to change the value of an input checkbox.

Short-term, an error message in the set_values function would be helpful if you try to change the value of a checkbox.

Medium-term, a method to change the checked attribute of input checkboxes in this function.

A related issue, which might just be sloppy coding, the search form I'm working with hasn't given unique names to each checkbox, they put the identifier in the value field. An error message or an iterator for cases where each field doesn't have a unique name would be helpful.

An example of an html form with checkboxes where the unique identifier is in the value field and not the name (possibly out of scope for rvest to address):

hcsearchurl <- "http://www.healthycanadians.gc.ca/recall-alert-rappel-avis/search-recherche/advanced-avancee/"
hcform <- read_html(hcsearchurl) %>% html_node("form") %>% html_form()

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementform 🧾

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions