Skip to content

jhta/form-autofill-js

Repository files navigation

form-autofill-js

Tool for auto filling html forms based on the fake data generator: casual.js

DEMO 1 - with CDN

DEMO 2 - with import

gif

The Tool identifies the html component based on the name and type params and fill it with a random pair from the object casual.

How to install

npm i -S -D form-autofill-js

or

yarn add form-autofill-js --dev

With CDN

<scripthttps://unpkg.com/form-autofill-js@latest/dist/main.js

<script src="https://unpkg.com/[email protected]/dist/main.js"></script>
  <script>Autofill.tool()</script>
</body>

how to use

Fill from javascript

import { fill } from 'form-autofill-js'

fill()

You can use a Button tool for fill with a button click event:

import { tool } from 'form-autofill-js'
Autofill.tool()

Add Chrome extension to Chrome

  • Clone repo
  • Go on chrome://extensions/
  • Enable Developer Mode
  • Load unpacked (to the directory)