


How to automatically clear the content after submitting the form in the mini program
Purpose: After the WeChat applet is submitted, the form content will be automatically cleared.
Idea analysis:
We can clear it through value binding, but this method will become very troublesome when there is a lot of form data.
Solution:
The form uses the bindreset event to submit data instead of the bindsubmit event, so that the form content will be automatically cleared after clicking submit.
But this will bring a new problem:
Using bindreset cannot obtain form data from the event parameter e.detail.value.name
(Learning video sharing: php video tutorial)
Therefore, it is necessary to obtain the content in the form binding event, such as
<input bindinput="inputText"/> inputText: function(e) { this.data.quesText=e.detail.value }
Related recommendations: 小program development tutorial
The above is the detailed content of How to automatically clear the content after submitting the form in the mini program. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6
Visual web development tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Chinese version
Chinese version, very easy to use