Skip to content

Modify Built-in Form Action Buttons

This guide explains how to use custom buttons to replace the default submit button of forms.

Modify Built-in Button Properties

Modify the properties of the default submit and reset buttons (including text, styles, etc.) using the global configuration items submitBtn and resetBtn. This lets you customize button appearance and behavior to meet your application needs.

Replace Built-in Buttons

  1. Hide Built-in Buttons

First, hide the default action buttons by setting the global configuration. This allows you to fully customize button styles and functionality.

js
const option = {
  submitBtn: false,
  resetBtn: false
}
  1. Custom Form Action Buttons

Next, add custom submit and reset buttons to handle form submission and reset. This approach lets you design buttons that meet your project requirements and handle click events.

FormCreate is an open-source project released under the MIT License. Free for personal and commercial use.