Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Pre filling answers from one survey to another

Pre filling answers from one survey to another 5 years 5 months ago #62508

  • sgaucho
  • sgaucho's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Hi,

I need to send a repeat survey with prefilled answers from a previously submitted survey (to validate whethe the previous answer is still valid).

The {INSERTANS:85378X15X255} tag permits me to fetch answer from a previous question within the same survey.

Is there any method to fill the answer fields from another survey?

Appreciate some suggestions!

tx,
sg
The administrator has disabled public write access.

Pre filling answers from one survey to another 5 years 5 months ago #62509

  • greg_d
  • greg_d's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Thank you received: 7
  • Karma: 4
In the current version Limesurvey get replacement values for INSERTANS placeholder from session variables, so it is not possible to get anything from database (take a look at insertansReplace($line) and retrieve_Answer($code, $phpdateformat=null) from common_funtions.php). PHP coding will be necessary.

You must also consider how are you going to determine 'previously submitted survey'.
Last Edit: 5 years 5 months ago by greg_d.
The administrator has disabled public write access.

Pre filling answers from one survey to another 5 years 5 months ago #62510

  • sgaucho
  • sgaucho's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Hmm..

Probably develop a PHP code to generate a copy of the previously submitted survey with the answers filled in and permit the user to validate the answers?
The administrator has disabled public write access.
Time to create page: 0.232 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form