Hide FormKit Submit Button: A Comprehensive Guide

Ruth Jul 09, 2026

FormKit, a powerful JavaScript library, offers a wide range of customization options for forms. One of these options is the ability to hide the submit button, which can be useful in various scenarios. This article will guide you through the process of hiding the submit button in FormKit, ensuring a clean and intuitive user interface.

Why Segmented Buttons Are Better Filters Than Dropdowns
Why Segmented Buttons Are Better Filters Than Dropdowns

Before we dive into the steps, let's understand why you might want to hide the submit button. In some cases, you might want to trigger form submission programmatically, or you might want to replace the submit button with a custom element. Whatever the reason, FormKit provides a simple way to achieve this.

a purple button with the words general site on it in front of a black background
a purple button with the words general site on it in front of a black background

Understanding the FormKit Submit Button

In FormKit, the submit button is not a standard HTML element but a component provided by the library. It's defined by the `formkit:submit` attribute. Understanding this is crucial because it helps us target the submit button specifically.

four different types of buttons with the words like, contact us and submit on them
four different types of buttons with the words like, contact us and submit on them

By default, FormKit adds a submit button to your form if you don't provide one. This button is labeled 'Submit' and has a type of 'submit'. However, you can customize this button or hide it entirely using FormKit's configuration options.

Hiding the Submit Button

a white button with the word enter and an arrow pointing up to the left side
a white button with the word enter and an arrow pointing up to the left side

To hide the submit button in FormKit, you need to set the `submit` option to `false` in your FormKit configuration. Here's a simple example:

<formkit type="my-form" submit="false" ></formkit>

In this example, the `submit` option is set to `false`, telling FormKit not to add a submit button to the form. However, this doesn't prevent you from submitting the form programmatically or using a custom submit button.

a cartoon character with the words who is it am? written on his head and letters flying around him
a cartoon character with the words who is it am? written on his head and letters flying around him

Programmatic Form Submission

After hiding the submit button, you might want to submit the form programmatically. FormKit provides a `submit()` method for this purpose. Here's how you can use it:

document.querySelector('formkit[type="my-form"]').submit();

3 Ways To Customize Genesis Search Form, Input Box & Button
3 Ways To Customize Genesis Search Form, Input Box & Button

In this example, we're selecting the FormKit form using its `type` attribute and calling the `submit()` method to submit the form.

Customizing the Submit Button

an image of a white cat with the caption how to open a door?
an image of a white cat with the caption how to open a door?
Les États-Unis affirment que Google a régulièrement détruit des preuves et menti sur l'utilis...
Les États-Unis affirment que Google a régulièrement détruit des preuves et menti sur l'utilis...
Abraham John 🦄🦓 (@Abmankendrick) on X
Abraham John 🦄🦓 (@Abmankendrick) on X
heh..
heh..
the buttons states are displayed in this screenshote, and it appears to be filled with
the buttons states are displayed in this screenshote, and it appears to be filled with
a red and black abstract design with the word hde on it's side
a red and black abstract design with the word hde on it's side
How To Hide Message Button On Facebook Page ?
How To Hide Message Button On Facebook Page ?
sadas
sadas
an image of a website page with many objects on it
an image of a website page with many objects on it
this user wishes they had a tail
this user wishes they had a tail
a piece of paper that says, i wanted to hide but did the thing anyway
a piece of paper that says, i wanted to hide but did the thing anyway
3 ways to hide messages on your iPhone and filter message alerts or notifications
3 ways to hide messages on your iPhone and filter message alerts or notifications
Therian userboxes!
Therian userboxes!
GROSGRAIN BUTTON STAND
GROSGRAIN BUTTON STAND
a black and white photo of a woman holding her hands to her face with rings on it
a black and white photo of a woman holding her hands to her face with rings on it
Passwords Not Being Hidden/Masked on iPhone: 4 Ways To Fix
Passwords Not Being Hidden/Masked on iPhone: 4 Ways To Fix
How to Hide Pins on Pinterest – Quick Guide
How to Hide Pins on Pinterest – Quick Guide
hi! i was bored and made a form! i'd love it you would fill it out!
hi! i was bored and made a form! i'd love it you would fill it out!
a screen shot of a website with the words showing someone your vulniable side
a screen shot of a website with the words showing someone your vulniable side
サイコベア Gloomy Bear Logo, Tokidoki Bear, Hacker Bear, Alien Gloomy Bear, Evil Lotso Toy Story, Chax Gp Gloomy Bear, Nanbaka Gloomy Bear, Hide And Seek 2005, Gloomy Bear Mascot
サイコベア Gloomy Bear Logo, Tokidoki Bear, Hacker Bear, Alien Gloomy Bear, Evil Lotso Toy Story, Chax Gp Gloomy Bear, Nanbaka Gloomy Bear, Hide And Seek 2005, Gloomy Bear Mascot

If you want to keep the submit button but customize it, you can do so using the `submit` option as well. Instead of setting it to `false`, you can provide a configuration object.

Here's an example where we change the label of the submit button to 'Send' and its type to 'button':

<formkit type="my-form" submit="{ label: 'Send', type: 'button' }" ></formkit>

In this case, the submit button will be labeled 'Send' and will behave like a regular button until you add a click event to submit the form.

Using a Custom Submit Button

If you want to replace the submit button with a custom element, you can do so by providing a custom template for the submit button. Here's an example:

<formkit type="my-form" submit="{ template: '<button type="submit">Custom Button</button>' }" ></formkit>

In this example, the submit button is replaced with a custom button labeled 'Custom Button'.

In conclusion, hiding the submit button in FormKit can be a useful technique for creating more intuitive and customizable forms. Whether you're hiding the button entirely or customizing it to fit your needs, FormKit provides the tools to do so. By understanding and utilizing these options, you can create forms that not only look great but also function exactly as you need them to.