Set values in a form.

set_values(form, ...)

Arguments

form

Form to modify

...

Name-value pairs giving fields to modify

Value

An updated form object

Examples

search <- html_form(read_html("http://www.google.com"))[[1]] set_values(search, q = "My little pony")
#> <form> 'f' (GET /search) #> <input hidden> 'ie': ISO-8859-1 #> <input hidden> 'hl': en #> <input hidden> 'source': hp #> <input hidden> 'biw': #> <input hidden> 'bih': #> <input text> 'q': My little pony #> <input submit> 'btnG': Google Search #> <input submit> 'btnI': I'm Feeling Lucky #> <input hidden> 'gbv': 1
set_values(search, hl = "fr")
#> Warning: Setting value of hidden field 'hl'.
#> <form> 'f' (GET /search) #> <input hidden> 'ie': ISO-8859-1 #> <input hidden> 'hl': fr #> <input hidden> 'source': hp #> <input hidden> 'biw': #> <input hidden> 'bih': #> <input text> 'q': #> <input submit> 'btnG': Google Search #> <input submit> 'btnI': I'm Feeling Lucky #> <input hidden> 'gbv': 1
# NOT RUN { set_values(search, btnI = "blah") # }