The default persistence implementation stores forms as JSON files, and the default location is ~/App_Data/Formulate/Json/. The format is pretty straightforward. Here's an example of a form JSON file:
There are other JSON files too (e.g., for validations, layouts, and so on). Maybe create what you're looking for manually, and then you can work out how to serialize similar JSON from there.
I'm happy to answer any questions you may have as well.
sometimes there are those usual forms like newsletter and contact us etc and
this is handy because we only have to create a helper with this json and it stays included in your plugin with no need for configuration :) ...perfect
Cool. In that case, you don't even need to do JSON serialization. You could just have the plugin drop the files in the file system (which you could create manually in advance in the Formulate section of the Umbraco back office).
create a form programmatically
is it possible to create a form programmatically?
thank you
Angelo
In a way, yes.
The default persistence implementation stores forms as JSON files, and the default location is
~/App_Data/Formulate/Json/
. The format is pretty straightforward. Here's an example of a form JSON file:There are other JSON files too (e.g., for validations, layouts, and so on). Maybe create what you're looking for manually, and then you can work out how to serialize similar JSON from there.
I'm happy to answer any questions you may have as well.
Hello Nicholas ...that is great :)
sometimes there are those usual forms like newsletter and contact us etc and this is handy because we only have to create a helper with this json and it stays included in your plugin with no need for configuration :) ...perfect
thank you a lot for your answer !
Angelo
Cool. In that case, you don't even need to do JSON serialization. You could just have the plugin drop the files in the file system (which you could create manually in advance in the Formulate section of the Umbraco back office).
is working on a reply...