Welcome, Guest
Username: Password: Remember me

TOPIC: Prefilling text field from token?

Re: Prefilling text field from token? 2 years 11 months ago #66572

  • waitz
  • waitz's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 171
  • Thank you received: 1
  • Karma: 3
There is an interesting thing that happens with the javascript warning:

If you forget a field, press Next, get the javascript warning (correct), then press the Previous button (for some reason).

What happens then is that both Next and Previous stop working and you cannot continue in the survey...

See the screen shot video: www.screencast-o-matic.com/watch/cX6VoHZM1
Version 1.91+ Build 11232 | PHP 5.3.9 | MySQL 5.1.56 |
Last Edit: 2 years 11 months ago by waitz.
The administrator has disabled public write access.

Re: Prefilling text field from token? 2 years 11 months ago #66575

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
waitz wrote:
There is an interesting thing that happens with the javascript warning:

If you forget a field, press Next, get the javascript warning (correct), then press the Previous button (for some reason).

What happens then is that both Next and Previous stop working and you cannot continue in the survey...

See the screen shot video: www.screencast-o-matic.com/watch/cX6VoHZM1
Please test if the problem still exists at the latest release. If so please open a ticket at the bugtracker and...
  1. Give as much information as possible
  2. Attach your survey. You can mark your ticket "private" so that only the developers will be able to take a look at it.
  3. Provide step-by-step instructions how to reproduce the problem.
  4. If possible/helpful please provide screenshots

Afterwards please post the link to the bugtracker so we can follow the progress.

Thanks!

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Prefilling text field from token? 2 years 11 months ago #66578

  • waitz
  • waitz's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 171
  • Thank you received: 1
  • Karma: 3
OK, will do!
Version 1.91+ Build 11232 | PHP 5.3.9 | MySQL 5.1.56 |
The administrator has disabled public write access.

Re: Prefilling text field from token? 2 years 11 months ago #66580

  • waitz
  • waitz's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 171
  • Thank you received: 1
  • Karma: 3
Hmmm. I have made quite a few changes in my limesurvey.

Does the comfort updater from 1.91+ 10494 to 11026 change a lot of files? Or is there an overview of which files it changes, so that I know where I have to repeat my changes?
Version 1.91+ Build 11232 | PHP 5.3.9 | MySQL 5.1.56 |
The administrator has disabled public write access.

Re: Prefilling text field from token? 2 years 11 months ago #66581

  • waitz
  • waitz's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 171
  • Thank you received: 1
  • Karma: 3
I have put in a bug report
Version 1.91+ Build 11232 | PHP 5.3.9 | MySQL 5.1.56 |
The administrator has disabled public write access.

Re: Prefilling text field from token? 2 years 11 months ago #66583

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4195
  • Thank you received: 789
  • Karma: 359
That's not a bug in the LS code, it's a bug in my workaround.

Replace:
$('form#limesurvey').submit(function () {

With:
$('#movenextbtn').click(function () {
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Prefilling text field from token? 2 years 11 months ago #66587

  • waitz
  • waitz's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 171
  • Thank you received: 1
  • Karma: 3
Thanks, Next and Previous is now working, but the prefilled fields are still reset to original when you go backwards...
Version 1.91+ Build 11232 | PHP 5.3.9 | MySQL 5.1.56 |
The administrator has disabled public write access.

Re: Prefilling text field from token? 2 years 11 months ago #66591

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4195
  • Thank you received: 789
  • Karma: 359
Well, yes, the script will do whatever you ask every time the page loads. If you want to allow respondents to go back in the survey you will need to put in a test to see if the field has been populated.
if($('#answer11111X22X3344').val() == '') {
	$('#answer11111X22X3344').val('{TOKEN:FIRSTNAME}');
}
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.168 seconds
Donation Image