angular-surveys icon indicating copy to clipboard operation
angular-surveys copied to clipboard

How to integrate in ASP.NET app?

Open bhaidar opened this issue 8 years ago • 4 comments

Hello, I would like to integrate the angular-surveys in my app such that a user can design a form, save the form and then later on open to submit an instance.

I really appreciate your assistance. Bila

bhaidar avatar Apr 20 '17 10:04 bhaidar

Hi, Take a look at https://github.com/mwasiluk/angular-surveys/issues/13 Regards

mwasiluk avatar Apr 20 '17 12:04 mwasiluk

Thanks a lot. Any recommendations on how to store the form design layout and model and then later on render the form to collect responses? Just a general idea to help me integrate this amazing module in my app.

Thanks

bhaidar avatar Apr 20 '17 15:04 bhaidar

You need to store formData (form model)/responseData (user response) passed to the mwFormBuilder/mwFormBuilder directives in your db. If you're not using mongo in your app then the simplest way is to store it as text and parse it to JSON before passing it back to the directives.

There is no save button in the mwFormBuilder (you can use it as a part of bigger ng form), so you have to create your own button and on click just save the formData object.

Hope that helps.

mwasiluk avatar Apr 20 '17 16:04 mwasiluk

Thanks a lot! That was helpful!

I am trying to read through the code and understand things as I might need to customize the builder. One of the things I want to add is relation between 2 questions. For instance, if Q1 has value 1, then show Q2, etc.

Can you guide me on how I can go through the code and understand how is it written to be able to customize it?

Thanks a lot.

bhaidar avatar May 15 '17 08:05 bhaidar