surveyjs / surveyjs-wordpress

Example of integration SurveyJS: Survey Library and Survey Creator into WordPress
https://wordpress.org/plugins/surveyjs/
36 stars 18 forks source link

Copying survey #13

Open DenFin opened 5 years ago

DenFin commented 5 years ago

It would be very handy to be able to copy a survey from the mysurveys view. So one could create a survey as a template and then copy it when needed.

tsv2013 commented 5 years ago

Thank you for the feedback! I've added this task to our backlog.

DenFin commented 5 years ago

Cool! Thank your for your quick reply. Can you tell when you will come around to this? More like sometime in the undefined future or more like in a month or so?

tsv2013 commented 5 years ago

More likely in a month or so. We'll collect a set of enchancements and then implement them.

DenFin commented 5 years ago

Hi there! Is there any news about this?

tsv2013 commented 5 years ago

Hi @DenFin ! Unfortunately no, at this moment we have other task related to SurveyJS Library and SurveyJS Creator products.

DenFin commented 5 years ago

Hi there! It's me again 😅. I have created a fork and implemented the feature that allows users to duplicate an existing survey. However this would be my first public pull request on GitHub, so I thought I might share my solution first before making a pull request to the official repository. It would be great if you could have a look at the code and provide some short feedback.

tsv2013 commented 5 years ago

@DenFin Yous code looks ok for me

mozesj commented 1 year ago

@DenFin how is this achieved? I can't seem to find any reference of the same

DenFin commented 1 year ago

@mozesj Sorry, I deleted my fork some time ago. I have no expertise in PHP and back when I forked the repo I just copy pasted parts from the create_survey logic, edited it and from there on it was just trial and error. But looking at the code, it seems like this has been implemented. Maybe have a look at this file or this commit

andyg2 commented 1 year ago

@DenFin how is this achieved? I can't seem to find any reference of the same

You can do this from the My Surveys Page in WordPress. Look for the green "clone" button.

https://github.com/surveyjs/surveyjs-wordpress/blob/26d6722d0edcb6574c1a8fb183303a19ffc51c07/src/trunk/views/mysurveys.php#L83