No <form> wrapper

48 views
Skip to first unread message

Tom Short

unread,
Aug 21, 2013, 10:30:03 AM8/21/13
to jquery...@googlegroups.com
Is it possible to generate form elements (select, radio, etc.) without the form wrapper? All my work is local, and I don't want any submit action. I'm having trouble with some inputs wanting to do a GET when the user hits Enter.

 

Daff

unread,
Aug 21, 2013, 10:35:47 AM8/21/13
to jquery...@googlegroups.com
Of course. The <form> wrapper is only added if you don't specify a type for the root element. Something like

$("#mydiv").dform({
    "type" : "submit",
    "value" : "Login"
});

Simply adds a submit button to #mydiv.

Tom Short

unread,
Aug 22, 2013, 8:44:05 PM8/22/13
to jquery...@googlegroups.com
Perfect. Now, I got it.

Tom Short

unread,
Aug 25, 2013, 12:18:02 PM8/25/13
to jquery...@googlegroups.com
jQuery-dForm works pretty well with some live Markdown pages I've been playing around with. See here for an example that uses jQuery-dForm:

http://tshort.github.io/mdpad/mdpad.html?example.md

The idea is that you write Markdown that includes JavaScript sections that turn the page into a live workpad. Form elements can be provided by a YAML specification using jQuery-dForm.

For more information and other examples, see here:

http://tshort.github.io/mdpad/

- Tom

Reply all
Reply to author
Forward
0 new messages