Check out the LimeSurvey source code on GitHub!

Simple Buttons

More
5 years 7 months ago #62835 by Mioji
Hello all!

Could you please assist me with the realization of design changes mentioned below?

Iam almost done for creating survey for android based app and figured up that it is very annoying to click on radio buttons or check-boxes on i-tab.

Currently iam using Question by Question. And I need to change 'list-radio' to simple buttons like this:

<FORM>
<INPUT TYPE="BUTTON" VALUE="Name of the button" ONCLICK="window.location.href='Next question'>
</FORM>

I cant find any solution to implement such things in the code. Basicly i cant even find where becomes transformation of {question_class} and etc from the template to the html code.

Please advise :dry:

Please Log in to join the conversation.

More
5 years 7 months ago #62839 by Earl
Hi,

I think 'jquery-ui button' might do the job.
But it is a little tricky specially for array-questions (you will have to do some changes in quanda.php to give the labels for the radiobuttons a value and some other little changes).
sorry my english is pretty poor, so maybe you just check if 'jquery-ui button' could be your choice and come back after.
I'd be happy to help.

Earl
The following user(s) said Thank You: Mioji

Please Log in to join the conversation.

More
5 years 7 months ago - 5 years 7 months ago #62848 by DenisChenu
Hello,

You want to go next page without click on next , but just in one radio-button.

Right ?

Then it's not in HTML, but in jquery.

I didn't test at all, but somethink like that in javascript:
$(.list-radio .radio).change(function() {
  $('#movenextbtn').click();
});

See workaround documentation for javascripting in LS:
docs.limesurvey.org/Workarounds%3A+Manip...ime+using+Javascript

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
Last Edit: 5 years 7 months ago by DenisChenu.
The following user(s) said Thank You: Mioji

Please Log in to join the conversation.

More
5 years 7 months ago #62856 by Mioji

You want to go next page without click on next , but just in one radio-button.


Right. But firstly i want to change:

<input class="radio" type="radio"

to

<input class="button" type="button"

But after i change it in qanda.php answers doesnt stores anymore.

Is it possible to do it with something like this:

<input class="button" type="button" value="'.$ansrow.'" name="'.$ia[1].'" id="answer'.$ia[1].$ansrow.'"'.$check_ans.' onclick="if (document.getElementById(\'answer'.$ia[1].'othertext\') != null) document.getElementById(\'answer'.$ia[1].'othertext\').value=\'\';'.$checkconditionFunction.'(this.value, this.name, this.type)" && .$movenext />

Please Log in to join the conversation.

More
5 years 7 months ago #62860 by Mioji
I've recently found how to manage this:

in quanda.php

under the do_list_radio

<input class="button" type="submit" value="'.$ansrow.'" name="'.$ia[1].'" id="answer'.$ia[1].$ansrow.'"'.$check_ans.' onclick="if (document.getElementById(\'answer'.$ia[1].'othertext\') != null) document.getElementById(\'answer'.$ia[1].'othertext\').value=\'\';'.$checkconditionFunction.'(this.value, this.name, this.type)" />


it was simple but hard to find for me.

Iam very greatful for your assistance guys.

Please Log in to join the conversation.

More
5 years 7 months ago #62878 by DenisChenu
I think it's best to do in javascript, i'm sure you can do it without changing qanda.php, then can update LS.

:)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form