Menu Close Menu
Menu
  • 0
    • Number of items in cart: 0

      • Your cart is empty.
      • Total: $0.00
      • Checkout
  • Pricing
    • Purchase Options
    • Individual Extensions
  • Support
    • Documentation
    • Log a Support Ticket
  • Your Account
    • Register
  • Blog

How to Hide Default Form Fields

How to Hide Default Form Fields

A simple way to hide the default submission form fields

Submission forms are always populated with some default fields which cannot be deleted via the Submission Forms page. However, it is still possible to hide any of those fields if you want to do so with some basic CSS code.

When you activate KB Support, or create a new submission form, a number of default fields are automatically added to the form:

  • First Name
  • Last Name
  • Email Address
  • Subject
  • Description

These are classed as default fields and are automatically added for you as they are generally the minimum fields your customers should complete when logging a ticket. Whilst you can change the name of these fields, choose whether or not they are required fields, and customise other options for the fields, it is not possible to delete them.

However, it is possible to hide them from the submission form so they are not visible to your customers, and to do so, is very simple.

Before we tell you how to do this, do note that we do not recommend you hide any of the default fields, except the Last Name field, if you wish to. Hiding the other fields will result in errors when your customers are using the submission form to log their tickets.

Hiding a Field

OK, so let’s assume we want to hide the Last Name field so that our customers do not have to complete it when logging a ticket.

Firstly, we need to update the configuration for the Last Name field and make sure it is not set as a required field:

  • Go to the Submission Forms page (Tickets -> Submission Forms) and click on the form you want to edit
  • Within the Last Name table row, click Edit
  • When the page reloads, make sure the Required? checkbox is unchecked within the Add a New Field metabox. Click Edit
  • The page will reload. You should now confirm that there is no asterix displayed under the Settings column for the Last Name field row

Last Name Form Field

Now that the Last Name field is not a required field, we can hide the field from the form.

  • Open the page on your website which contains the submission form (you may need to log out, or use a different browser)
  • View the HTML source for the page and locate the section within which the Last Name field is displayed
  • The field (including its label if visible) is wrapped within a <p> tag. Make a note of the class that is defined for this tag. By default, the tag will be <p class="kbs-last-name"> and so the class you need to note is kbs-last-name
  • Head back to your WordPress admin screen and navigate to Appearance -> Customise
  • When the customiser opens, click the Additional CSS tab to open the CSS editor
  • Within the editor, enter:
    p.kbs-last-name	{
        display: none;
    }
    
  • Click Publish to save the changes

Now, navigate back to the page on your website which contains the submission form (you may need to log out, or use a different browser), refresh the page if you left it open, and the Last Name field is no longer displayed.

Hidden Last Name


Was this article helpful?

We're working hard to ensure we provide you with useful and relevant documentation to help you get the most out of KB Support.

Please take a moment to let us know if you found this article helpful.

How to Hide Default Form Fields

Submission forms are always populated with some default fields which cannot be deleted via the Submission Forms page. However, it is still possible to hide any of those fields if you want to do so with some basic CSS code. When you activate KB Support, or create a new submission form, a number of default…
KB Article rating: 5.0 based on 1 ratings
FAQs Customisation Submission Forms Last updated: 21/04/2018

Published by Cristian Raiber

Posts by Cristian Raiber

Post navigation

Previous

IMAP Options in Email Support

Next

Configuring WooCommerce

Contact Details

  • Follow us on Twitter
  • Like us on Facebook
  • Fork us on GitHub

Developer Resources

Plugin Boilerplate

Trello Board

GitHub Repository

Ratings & Satisfaction Docs

  • Configuring Ratings and Satisfaction
  • Advanced Settings

Email Support Docs

  • Plugin Requirements
  • Configuring Email Support
  • Creating New Tickets
  • Replying to Closed Tickets
  • Anonymous Replies in Email Support
  • HTML Emails Tags
  • Email Commands
  • Defining IMAP Flags

KBS REST API Docs

  • Using the REST API
  • Tickets REST API Route
  • Replies REST API Route
  • Articles REST API Route
  • Agents REST API Route
  • Customers REST API Route
  • Companies REST API Route
  • Forms REST API Route
  • Form Fields REST API Route
  • Ticket Categories REST API Route
  • Ticket Departments REST API Route
  • Ticket Source REST API Route

Article Categories

  • Configuration
    • Advanced
    • Getting Started
  • Developer Docs
    • Constants
    • Hooks
  • Extensions
  • FAQs
© 2023 KB Support. All rights reserved.
  • Blog
  • Shop
  • Support
  • Privacy Policy
  • Discount Code