UNPKG

io-ui-jsonform

Version:

HTML JSON form submission polyfill based on http://darobin.github.io/formic/specs/json/ .

78 lines (76 loc) 2.96 kB
<html> <head> <title>Test</title> </head> <body> <form enctype='application/json' action="http://localhost:3005/pets" method="POST"> 1 <input name='name' value='Bender'> <select name='hind'> <option selected>Bitable</option> <option>Kickable</option> </select> <input type='checkbox' name='shiny' checked> <input type="submit" name="some_name" value="Submit"> </form> <form enctype='application/json' action="http://localhost:3005/pets" method="POST"> 2 <input type='number' name='bottle-on-wall' value='1'> <input type='number' name='bottle-on-wall' value='2'> <input type='number' name='bottle-on-wall' value='3'> <input type='submit' value='Submit'> </form> <form enctype='application/json' action="http://localhost:3005/pets" method="POST"> 3 <input name='pet[species]' value='Dahut'> <input name='pet[name]' value='Hypatia'> <input name='kids[1]' value='Thelma'> <input name='kids[0]' value='Ashley'> <input type='submit' value='Submit'> </form> <form enctype='application/json' action="http://localhost:3005/pets" method="POST"> 4 <input name='hearbeat[0]' value='thunk'> <input name='hearbeat[2]' value='thunk'> <input type='submit' value='Submit'> </form> <form enctype='application/json' action="http://localhost:3005/pets" method="POST"> 5 <input name='pet[0][species]' value='Dahut'> <input name='pet[0][name]' value='Hypatia'> <input name='pet[1][species]' value='Felis Stultus'> <input name='pet[1][name]' value='Billie'> <input type='submit' value='Submit'> </form> <form enctype='application/json' action="http://localhost:3005/pets" method="POST"> 6 <input name='wow[such][deep][3][much][power][!]' value='Amaze'> <input type='submit' value='Submit'> </form> <form enctype='application/json' action="http://localhost:3005/pets" method="POST"> 7 <input name='mix' value='scalar'> <input name='mix[0]' value='array 1'> <input name='mix[2]' value='array 2'> <input name='mix[key]' value='key key'> <input name='mix[car]' value='car key'> <input type='submit' value='Submit'> </form> <form enctype='application/json' action="http://localhost:3005/pets" method="POST"> 8 <input name='highlander[]' value='one'> <input type='submit' value='Submit'> </form> <form enctype='application/json' action="http://localhost:3005/pets" method="POST"> 9 <input type='file' name='file' multiple> <input type='submit' value='Submit'> </form> <form enctype='application/json' action="http://localhost:3005/pets" method="POST"> 10 <input name='error[good]' value='BOOM!'> <input name='error[bad' value='BOOM BOOM!'> <input type='submit' value='Submit'> </form> </body> </html>