1. Component Guide
  2. Button
  3. With name and value set
Button example

With name and value set

By default, the button has no value or name set so it will not pass information when the form is submitted. This allows a name and value to be added so a button can add information to the form submission.

Please note that Internet Explorer 6 and 7 have breaking bugs when submitting a form with multiple buttons - this can change what value is submitted by the button. Make sure to check your user needs and browser usage.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/button", {
  text: "This is the button text",
  value: "this_is_the_value",
  name: "this_is_the_name"
} %>