Dform Callback

83 views
Skip to first unread message

Juan Pablo Rivillas Ospina

unread,
Jan 24, 2014, 12:01:01 PM1/24/14
to jquery...@googlegroups.com
Hello,

I want to know if dform has a callback to make something after creating the forms, i read the documentation and it say yes but it´s no working for me. Maybe i am using it in a wrong way


$("#myForm").dform({
"html" : [ {
caption : "Filters:",
type : "textarea",
id : "filters",
name : "filters",
colspan: 1
}] 
}, function() {
                      // DO SOMETHING AFTER IT IS CREATED
                });


Thank you

David Luecke

unread,
Jan 24, 2014, 12:07:02 PM1/24/14
to jquery...@googlegroups.com
If you are not loading a .json file the form will be generated synchronously so you don't need the callback:

$('#myForm').dform();
// Do something else here, form is created

You will need the callback only when loading a JSON file:

$('#myForm').dform('form.json', function(form) { });


--
You received this message because you are subscribed to the Google Groups "jQuery dForm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jquery-dform...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages