post-button

0.3.0 • Public • Published

post-button simply creates an HTML form with a submit button in it, and hidden fields with whatever data you need POSTed:

var postButton = require("post-button")
 
var html = postButton("Cancel order", "/orders/15", {authorization: "f1f0"})

Outputs something like:

<form style='display: inline;' method='POST' action='/orders/15'>
  <input type='submit' value='Cancel order' />
  <input type='hidden' name='authorization' value='f1f0' />
</form>

Readme

Keywords

none

Package Sidebar

Install

npm i post-button

Weekly Downloads

3

Version

0.3.0

License

none

Unpacked Size

1.74 kB

Total Files

4

Last publish

Collaborators

  • erikpukinskis