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

( ! ) Warning: sprintf(): Too few arguments in /var/www/clients/client1/web1/web/libraries/joomla/language/text.php on line 312
Call Stack
#TimeMemoryFunctionLocation
10.0001233368{main}( )../index.php:0
20.09451016024JApplicationCms->execute( )../index.php:49
30.09451016224JApplicationSite->doExecute( )../cms.php:261
40.17294742864JApplicationSite->dispatch( )../site.php:230
50.17484828168JComponentHelper::renderComponent( )../site.php:191
60.17554918800JComponentHelper::executeComponent( )../helper.php:380
70.17554937288require_once( '/var/www/clients/client1/web1/web/components/com_kunena/kunena.php' )../helper.php:405
80.20237335448KunenaController->execute( )../kunena.php:104
90.20237335840KunenaController->executeTask( )../controller.php:215
100.20237337016KunenaController->display( )../controller.php:157
110.226313272512KunenaView->displayAll( )../controller.php:398
120.233013393200include( '/var/www/clients/client1/web1/web/components/com_kunena/template/blue_eagle/html/display.php' )../view.php:116
130.257514198848KunenaView->displayLayout( )../display.php:21
140.257514201128KunenaViewTopic->displayDefault( )../view.php:195
150.268614605304KunenaViewTopic->_prepareDocument( )../view.html.php:147
160.268714605984JText::sprintf( )../view.html.php:1370
170.268714606600call_user_func_array ( )../text.php:312
180.268714606984sprintf ( )../text.php:312

TOPIC: Response is Equal to 100%

Response is Equal to 100% 2 years 5 months ago #110413

  • lmw1
  • lmw1's Avatar
  • Offline
  • Junior Lime
  • Posts: 33
  • Thank you received: 1
  • Karma: 1
The percentages for Race/Ethnicity can add up to more than 100%. For instance, the example below shows 3 races, each selected at 100%. I can move forward to the next page with these selections even though the total is 300%.

Race/Ethnicty is a very important variable in our data set, how can I code this page so that regardless of how many choices the user makes (it can range from 1 to 5), the total MUST equal 100%?

Also, for the alert message when the user "violates" this rule, the message should indicate that the button choices must total 100%. How can this be done?

*See attached image

Respectfully,
LMW1
Attachments:
The administrator has disabled public write access.

Response is Equal to 100% 2 years 5 months ago #110415

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9555
  • Thank you received: 1373
  • Karma: 389
Hi,

Think it's etter to use an Array quetsion type:
- To use Array filter
- To use Whole question validation.

Think it's linked to this feature request :
bugs.limesurvey.org/view.php?id=8885

Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time (Need support ?).
A bug not reported is a bug not corrected. | 2.61lts version improved | Need plugins for LimeSurvey ?
The administrator has disabled public write access.
The following user(s) said Thank You: lmw1

Response is Equal to 100% 2 years 5 months ago #110422

  • lmw1
  • lmw1's Avatar
  • Offline
  • Junior Lime
  • Posts: 33
  • Thank you received: 1
  • Karma: 1
I created an array successfully but am stumped on how to set it up to where it must equal 100%.

Right now, the user can click 100% on "all" the choices (which equals 500% and this not what we want).

Any help in the right direction would be greatly appreciated.

*See attached image

Respectfully,
LMW1
Attachments:
The administrator has disabled public write access.

Response is Equal to 100% 2 years 5 months ago #110428

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9555
  • Thank you received: 1373
  • Karma: 389
1st : for answer code : use 100,75,50,12 and 0

And use something like this:
sum(that)<=100)
in Whole question equation : manual.limesurvey.org/Question_type_-_Ar...28em_validation_q.29
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time (Need support ?).
A bug not reported is a bug not corrected. | 2.61lts version improved | Need plugins for LimeSurvey ?
The administrator has disabled public write access.
Time to create page: 0.214 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form