Welcome, Guest
Username: Password: Remember me

TOPIC: Can I suppress the 'one or more mandatory questions' dialogue box

Can I suppress the 'one or more mandatory questions' dialogue box 3 years 2 months ago #64044

  • petere
  • petere's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
I have a survey where I am doing some autofilling of fields based on spreadsheet lookup and also calculations based on question answers and what happens is that at the point of triggering the autofilling I get the 'one or more madatory questions have not been answered' pop-up because some subsequent questions in the group are mandatory. I do like the red mandatory question text appearing for these mandatory questions but it is annoying having to deal with these pop-ups as data is being entered. Is there a way to suppress these pop-ups or can I be pointed at the relevant bit of code that would need to be changed to suppress them

Many Thanks
The administrator has disabled public write access.

Re: Can I suppress the 'one or more mandatory questions' dialogue box 3 years 2 months ago #64045

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6451
  • Thank you received: 844
  • Karma: 249
Replace the javascript alert function in template.js, with .... nothing
function alert(){
}
The administrator has disabled public write access.

Re: Can I suppress the 'one or more mandatory questions' dialogue box 3 years 2 months ago #64046

  • petere
  • petere's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
Thanks I will give this a try
The administrator has disabled public write access.

Re: Can I suppress the 'one or more mandatory questions' dialogue box 3 years 2 months ago #64048

  • petere
  • petere's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
Shnoulle wrote:
Replace the javascript alert function in template.js, with .... nothing
function alert(){
}

I do not have an alert function in template.js :( but thanks for the suggestion.
The administrator has disabled public write access.

Re: Can I suppress the 'one or more mandatory questions' dialogue box 3 years 2 months ago #64064

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 4272
  • Thank you received: 806
  • Karma: 369
Just add it. It will override the core alerts.
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: Can I suppress the 'one or more mandatory questions' dialogue box 3 years 2 months ago #64209

  • petere
  • petere's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
I put the empty alert function in my template.js but it did not supress the alert unfortunately.

I am still running version 1.87 and maybe this is the problem and I will look at upgrading in a week or two... at the moment I am reluctant in case I break something that we are relying on.

Supressing the alert is not a deal breaker and is just a nice to have at the moment but I was hoping it was going to be a quick and easy thing to address.

Thanks for the help and hopefully I can get on top of this for when this survey goes live later in the month.
The administrator has disabled public write access.

Re: Can I suppress the 'one or more mandatory questions' dialogue box 3 years 2 months ago #64216

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6451
  • Thank you received: 844
  • Karma: 249
Hello,

Did you have something like that in your startpage.pstpl
<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>

:)

PS: demonstration.sondages.pro/upload/templa...ll_alert/template.js
The administrator has disabled public write access.

Re: Can I suppress the 'one or more mandatory questions' dialogue box 3 years 2 months ago #64264

  • petere
  • petere's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
Shnoulle wrote:
Hello,

Did you have something like that in your startpage.pstpl
<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>

:)

PS: demonstration.sondages.pro/upload/templa...ll_alert/template.js

Thanks so much for this. That has got me going and it is all working very well now.
The administrator has disabled public write access.

Re: Can I suppress the 'one or more mandatory questions' dialogue box 3 years 2 months ago #64271

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6451
  • Thank you received: 844
  • Karma: 249
You're welcome!

If our hints have been helpful and you enjoy limesurvey please consider a donation to the team .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.

;)
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.125 seconds
Donation Image