dobtco / formbuilder

[Needs Maintainer] Formbuilder is a small graphical interface for letting users build their own webforms.
http://dobtco.github.io/formbuilder/
MIT License
1.84k stars 489 forks source link

Save function in extenal button #117

Open lucaspanik opened 9 years ago

lucaspanik commented 9 years ago
FB = new Formbuilder({
         selector: '#formBuilder',
         bootstrapData: [
            {
               "label":"Texto",
               "field_type":"text",
               "required":true,
               "field_options":{
                  "size":"large",
                  "description":"desc Texto"
               },
               "cid":"c14"
            }
          ]  
});

FB.on('save', function(payload){  
    console.log(payload);
});

I need something like this:

<input type="button" value="Save Form" onclick="FB.save" />

Is it possible?

liliankasem commented 9 years ago

I set autosave to false in "Formbuilder.options= { }" in formbuilder.js. This turned the saveform button into something similar to what you mentioned

lucaspanik commented 9 years ago

Thanks for listening friend!

I have done the process indicated, but need an external button that performs the save function.

In addition to the existing form to save button, I need an external example 'input: button'.