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
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.
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.