Skip to content

knowler/log-form-element

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Log Form Element

Wrap a <form> element with this and it’ll prevent the default submission and log the form data to the console instead. See the demo on CodePen.

import { LogFormElement } from "https://esm.sh/gh/knowler/log-form-element/log-form-element.js?raw";

LogFormElement.define();
<log-form>
	<form>
		<label>
			<input type="checkbox" name="some-feature">
			Enable some feature
		</label>
		<button>Submit</button>
	</form>
</log-form>

About

A custom element that will log a form’s submissions to the console.

Topics

Resources

Stars

Watchers

Forks