Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hello guys,

I am trying to embed a survey on a CouchCMS managed page. I am using http://surveyjs.org for this.
What I was planning was to get these results on a table on the same db with CouchCMS. Then create a report page, than I had an issue.
I want to add a link in backend on the left hand side menu, when clicked I want to show a custom report from the table using simple php codes.

Is this possible? Or would you recommend me another way of doing this? I would do this with a data-bound form but managing steps and data types seems easier with this js library.

Thank you for your comments.
@gratas,

Have you been able to achieve what you were aiming for?

If not, i would request you to please post your code of the DataBound Forms and of the survey.js form for us to be able to help you better.

If yes, I would request you to please share your solution with the community.

Also, I would like to mention that, you can easily call in the couch tags right into the JavaScript to input or generate output. I have done it many a times.

Please let us know!

Regards,
GenXCoders
Image
where innovation meets technology
Hello GenXCoders,

I did solve the issue with traditional PHP way because I did not have the time to work around the issue.

There are 132 fields in the form, I managed to use Survey.js interface to build it and to be honest I really did not feel okay to write all the inputs as Databound form.

Can you direct me how can I post the data to Databound forms? Currently I am sending it to a php file like this;

Code: Select all
    survey.onComplete.add(function (s) {
        var myd = JSON.stringify(s.data);
        $.ajax({
            type: "POST"
            , dataType: "json"
            , url: "get-form.php"
            , data: {
                myData: myd
            }
            , success: function (data) {
                alert('Items added');
            }
            , error: function (e) {
                console.log(e.message);
            }
        });
    });
3 posts Page 1 of 1