Configure checkboxes, radio buttons, and select inputs in Webflow. Show
Whether you're creating a survey, a signup form, or any type of form for that matter, you can include 3 types of form inputs that allow your site visitors to make single or multiple choices. In this lesson
And a bonus "customizing checkboxes and radio buttons" section. Before getting startedKeep in mind that all form inputs can only be placed inside of a form block. Make sure you read intro to Forms to learn how you can use these are other form inputs. Also, check out styling forms to learn more about styling other form elements. CheckboxesCheckboxes allow a user to select multiple choices. Set the Name of each checkbox so you can identify them in the form submission data. Checkboxes have Default styling. To override this default style, choose the Custom option in the Checkbox settings. You can also set if a checkbox should be checked by default by ticking the Start Checked box. If you want your users to tick a checkbox to confirm for example that the information provided is accurate, you can check the Required field in the checkbox settings. Radio ButtonsRadio buttons allow a user to select a single option among multiple options. You can set the Choice Value of each option, for each button, as well as group these buttons by giving them the same Group Name. Radio buttons have Default styling. To override this default style, choose the Custom option in the Radio settings. Let's say you want to create a group of radio buttons for a question with values yes and no. You can group the two buttons by adding the same Group Name to both: "Do you enjoy long walks on the beach?" and setting the Choice Value of one to "Yes" and the other to "No". Now, let's say you want to add another group of options as a response to "Will you attend the next conference?" The values will be: yes, maybe, and no. So, you add three radio buttons and make sure all three of them have the same group name: "Attending". Then, you set the Value of each one separately. Select listsYou can also add a dropdown list of choices. By default, a single choice can be selected from this dropdown. However, you can Allow Multiple Selections as well by enabling the setting in the Select Field setting panel. Name your Select Field and set whether you want to allow multiple selections or notYou can set the choices for the Select field in the advanced input settings in the Settings Panel on the right.
Customize form checkboxes and radio buttonsTo override the default styling of checkboxes or radio buttons, enable the Custom style option in the checkbox or radio button settings. Then head over to the Style panel and customize the buttons as you please. And if you ever want to switch back to the default styling, you can do that by choosing the Default option. If you set custom styling, then reuse the same class name on another form - make sure the custom option is selected again.Customize the “checked” state to control how checkboxes and radio buttons look when selectedOnce you enable Custom styling for these elements, you can select the buttons themselves and style them in all states, including a custom “checked” state that you can use to control how these elements look when they’ve been selected. To keep radio buttons and checkboxes accessible for people using arrow keys to navigate through forms, the focused state of both elements come with a default blue shadow. Try Webflow — it's free
By default, and unless instructed otherwise in these or other applicable guidelines, text should be:
The size of text used for answers should be the same as for questions (including labels on radio buttons and check boxes). The background colour of a form should be white (that is, #FFFFFF), unless a different colour is needed to improve usability. If the background has a colour, it should be a tint of no more than 10%. Because not all form-fillers can perceive it, colour should never be used as the sole method of conveying information. Except for very large text and help text, the contrast between text and background colours (for example on buttons) should be at least 8:1, as recommended by the W3C. Large text should have a contrast of 3:1. Help text should have a contrast ratio of 4.5:1. Link text should be underlined, and in a different colour from the surrounding text. If link text isn't underlined, the contrast ratio for the link text colour versus the surrounding text colour should be at least 3:1. There are several free tools available for checking colour contrast, including: For more information on colour contrast, visit the Contrast (Minimum) page on the W3C website . Form titleEvery form must have a unique, descriptive title. Avoid using redundant terms like 'form', 'online' or the name of the business unit (the header says this). Set the title in the largest font used anywhere in the form, and position it flush left. Programmatically, use the h1 element to mark up the form title. When choosing a title, put the subject before the verb. This makes it easier to find the right form, as when searching, form-fillers are focused on the subject matter more than the related action. The exception to this rule is forms within a user portal, such as the forms inside the Working With Children Check Unit’s MyCheck. In-portal forms are usually for performing actions on the user’s account, so are more appropriately named with verb before the subject. When referring to a form in the text of a website, use the exact form title.
Form-fillers should have access to telephone support during appropriate hours. Telephone support enables form-fillers to move past blocks — such as being unsure how to answer a question — in the most frictionless way (that is, while still on the relevant screen of the form). In turn, for the business unit, this improves data quality and reduces costs. Data quality is improved because on required questions, form-fillers can give accurate answers (rather than guessing or providing nonsense answers, just to get past validation). The Working With Children Check Unit experienced inserting of nonsense answers first hand. When a field was required but some form-fillers legitimately didn't have any answer for it, the Unit started receiving submissions with spaces, dashes, full stops or other single characters entered. Costs are reduced because:
Moreover, if they need it, form-fillers will find contact information one way or another. Thus, displaying the details on the form will not significantly increase call volumes, yet it will improve form-filler satisfaction. Provide a brief description of the support and its availability (days, hours and time zone), for example: Make this information always visible no matter what step of the form the form-filler is on. Contact information can be set flush right. Form titleAs mentioned earlier, every form has at least one heading: the form title. The form title is the largest font in the form. Single-step forms don't need a step heading; the form title suffices. Multi-step forms should have a heading for each step. This heading should be set flush left, in a font that is smaller than the form title but larger than message headings. Programmatically, use the h2 element for step headings. Step headings should be brief (that is, 1–5 words). Avoid the use of redundant terms like 'details' and 'information'. Boxes showing summaries of errors, warnings or feedback should include a heading, as follows:
The font for message headings should be smaller than step headings but larger than section headings. Avoid section headings (but not necessarily sections themselves). Research shows form-fillers often use section headings to decide whether they need to complete the section, so section headings increase the chance of errors. Where used, section headings should describe what the section is about. Never use a section heading to ask a question. The font for section headings should be smaller than message headings but larger than that used for field labels and question-level help. Like field labels, section headings should be set flush left: If a form screen is broken into sections, programmatically the fieldset element and legend tag should be used to create and caption the sections for screen readers. To mark up section headings, use the h2 (if the form is single-step) or h3 (if the form is multi-step) element. Page titleEvery screen of the form should have a unique and meaningful page title (that is, the browser tab or window label), marked up using the title element. By default, the page title should be 'Step heading – Form title'. The business unit name can be appended to the page title. Progress indicatorDisplay a progress indicator when a form has more than one data-entry step, not counting Eligibility or Review (refer to Layout of forms - key screens). The exception is when the form is being viewed on a mobile/small screen. In this case, the progress indicator should be a simple label indicating which step the user is on, and the total number of steps contained within the form for example 'Step 1 of 5', 'Step 2 of 5', etc. Because the steps in the form must be completed in a specific, linear sequence, sometimes with dependencies between steps, no parts of the progress indicator should be clickable. If a multi-step form has no dependencies between steps, and steps can be completed in any order, a tabbed form design should be used rather than a progress indicator. A standard for the design of a tabbed form isn't provided here because at the time of writing, there were no prototypical forms of this type. Moreover, the tabbed form is relatively uncommon on the web, and so international best practices aren't yet established. If you use a tabbed web form in the future, test the design thoroughly with users before going live. The progress indicator should have one 'node' for each step in the form, including Review but excluding Eligibility (page 101) and Completion (page 106). The label for each node should be exactly the same as its corresponding step heading. don't number steps or use redundant terms like 'step' or 'page'. Each node can have one of three states:
Each state should have a different background colour, with the current step being the most visually prominent. Default colours should be:
Completed steps should also have a tick icon (for example in colour #327828). Reinforce the sequential nature of the form by linking nodes with a directional arrow. Make sure there's enough space between nodes so that their labels don't come to close to each other. If necessary, wrap labels, but ideally not over more than two lines. Node labels should be set centred, vertically aligned with the middle of the node. An example of a progress indicator that meets these requirements is shown below. 'Mother' is the current step: In the progress indicator, don't include Introduction, Eligibility or Completion. (Refer to Layout of forms - key screens.) The content of the progress indicator should be conveyed to screen reader users (for example use ALT text for nodes — if nodes programmed using HTML images — or hidden CSS — if nodes are CSS background images). NumberingDon't number sub-questions. QuestionsBy default, questions should not be numbered. Number questions if you need to refer to them. Question numbering should be in numerals (that is, '1, 2, 3…'). If you are numbering questions, your questions will usually be long and thus flush left. In such cases, there should be a hanging indent so the question number stands out from the text. The numbers can be written either with a prefix of 'Q' and without a full stop, or without the 'Q' and with a full stop: When referring to questions, use 'Q' if this prefix is being used when numbering (as per example above left). Otherwise, write 'question' (as per example above right). Question numbering continues sequentially across sections and steps. For example, if the last question in a step is Q21, the first question in the next step is Q22. SectionsDon't number sections. StepsBy default, step should not be numbered. Numbers make it harder to scan the step names, and over-emphasise that the form has many steps. Space and dividersEnsure there's sufficient vertical space between form components. The space between components of the same type (for example between questions) should also be consistent. Borders and dividers — for example, between questions or sections — are ineffective separators. This is because their lines compete with the borders of text fields and drop downs: As such, separating borders and dividers should not be used. Instead, the relationship between elements should be conveyed through the adjustment of space, particularly in the vertical. In the illustration above, the greatest vertical space is between sections (1). there's less vertical space between questions (2) and the least vertical space is between sub-questions (3). The underlying principle at work here is that humans see objects that are close to each other as related, whereas objects that are far away from each other are seen as not being related. This is the Gestalt Law of Proximity. Use this principle throughout the form, including communicating:
Zebra stripingWhen additional separation is needed, zebra striping works well. Zebra striping is the alternate application of a very light grey tint (for example #E6E6E6): When field labels are positioned to the left of fields, zebra striping must be used, to help visually connect the labels to the fields. When using zebra striping:
For more information on zebra striping, visit: CaseAll text should be in sentence case. This means capitalising the first letter of the first word (of the title, label, tip etc) but not capitalising any other letters: Don't use title case, which is where the first letter of every word is capitalised: For emphasis within a piece of text, use bold: Don't use upper case for emphasis; because we encounter them infrequently, upper case words are more difficult to read than lower case words. For more information, visit The Science of Word Recognition page on the Microsoft website .
Except for dates, there should only ever be one text field per label. This means numbers like ABN or credit card are to be collected via a single text field, rather than multiple text fields (one for each 'chunk'). Do this: Don't do this: Taking this approach eliminates the problems associated with using a field for each chunk, namely:
For more information on auto-tabbing, visit Why we care more about effectiveness than efficiency or satisfaction - GDS user research blog . Dates are an exception because they are actually three fields combined into one: day, month and year:
Where attachments can or must be uploaded with the form, follow this structure:
For example: The button to select a file should bring up the operating system’s file explorer tool. The screen should stay anchored to the Attachments section throughout the attachment process. Messages in formsAt a form- or step-level, 'messages' includes:
At a question-level, 'messages' refers to individual errors, warnings and reinforcements. By default, and aside from any headings, all messages should be presented in the same font size, weight and colour as questions. All messages should be written in plain English, with a polite, non-accusatory, tone. For errors, the focus should be on what must be done in order to progress, not what was done 'wrong'. Except for warning messages about cancelling or timing out of a form, all messages should be within the form screen, not in a modal window.
Reviewed 12 April 2021
|