EVOLUTION-MANAGER
Edit File: submitButton.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Create a submit button</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for submitButton {shiny}"><tr><td>submitButton {shiny}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Create a submit button</h2> <h3>Description</h3> <p>Create a submit button for an app. Apps that include a submit button do not automatically update their outputs when inputs change, rather they wait until the user explicitly clicks the submit button. The use of <code>submitButton</code> is generally discouraged in favor of the more versatile <code><a href="actionButton.html">actionButton()</a></code> (see details below). </p> <h3>Usage</h3> <pre> submitButton(text = "Apply Changes", icon = NULL, width = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>text</code></td> <td> <p>Button caption</p> </td></tr> <tr valign="top"><td><code>icon</code></td> <td> <p>Optional <code><a href="icon.html">icon()</a></code> to appear on the button</p> </td></tr> <tr valign="top"><td><code>width</code></td> <td> <p>The width of the button, e.g. <code>'400px'</code>, or <code>'100%'</code>; see <code><a href="reexports.html">validateCssUnit()</a></code>.</p> </td></tr> </table> <h3>Details</h3> <p>Submit buttons are unusual Shiny inputs, and we recommend using <code><a href="actionButton.html">actionButton()</a></code> instead of <code>submitButton</code> when you want to delay a reaction. See <a href="http://shiny.rstudio.com/articles/action-buttons.html">this article</a> for more information (including a demo of how to "translate" code using a <code>submitButton</code> to code using an <code>actionButton</code>). </p> <p>In essence, the presence of a submit button stops all inputs from sending their values automatically to the server. This means, for instance, that if there are <em>two</em> submit buttons in the same app, clicking either one will cause all inputs in the app to send their values to the server. This is probably not what you'd want, which is why submit button are unwieldy for all but the simplest apps. There are other problems with submit buttons: for example, dynamically created submit buttons (for example, with <code><a href="renderUI.html">renderUI()</a></code> or <code><a href="insertUI.html">insertUI()</a></code>) will not work. </p> <h3>Value</h3> <p>A submit button that can be added to a UI definition. </p> <h3>See Also</h3> <p>Other input elements: <code><a href="actionButton.html">actionButton</a>()</code>, <code><a href="checkboxGroupInput.html">checkboxGroupInput</a>()</code>, <code><a href="checkboxInput.html">checkboxInput</a>()</code>, <code><a href="dateInput.html">dateInput</a>()</code>, <code><a href="dateRangeInput.html">dateRangeInput</a>()</code>, <code><a href="fileInput.html">fileInput</a>()</code>, <code><a href="numericInput.html">numericInput</a>()</code>, <code><a href="passwordInput.html">passwordInput</a>()</code>, <code><a href="radioButtons.html">radioButtons</a>()</code>, <code><a href="selectInput.html">selectInput</a>()</code>, <code><a href="sliderInput.html">sliderInput</a>()</code>, <code><a href="textAreaInput.html">textAreaInput</a>()</code>, <code><a href="textInput.html">textInput</a>()</code>, <code><a href="varSelectInput.html">varSelectInput</a>()</code> </p> <h3>Examples</h3> <pre> if (interactive()) { shinyApp( ui = basicPage( numericInput("num", label = "Make changes", value = 1), submitButton("Update View", icon("refresh")), helpText("When you click the button above, you should see", "the output below update to reflect the value you", "entered at the top:"), verbatimTextOutput("value") ), server = function(input, output) { # submit buttons do not have a value of their own, # they control when the app accesses values of other widgets. # input$num is the value of the number widget. output$value <- renderPrint({ input$num }) } ) } </pre> <hr /><div style="text-align: center;">[Package <em>shiny</em> version 1.5.0 <a href="00Index.html">Index</a>]</div> </body></html>