Welcome, Guest
Username: Password: Remember me

TOPIC: Simple Buttons

Simple Buttons 2 years 9 months ago #62835

  • Mioji
  • Mioji's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
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:
The administrator has disabled public write access.

Aw: Simple Buttons 2 years 9 months ago #62839

  • Earl
  • Earl's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 42
  • Thank you received: 1
  • Karma: 3
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 administrator has disabled public write access.
The following user(s) said Thank You: Mioji

Re: Aw: Simple Buttons 2 years 9 months ago #62848

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 5845
  • Thank you received: 715
  • Karma: 222
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
Last Edit: 2 years 9 months ago by DenisChenu.
The administrator has disabled public write access.
The following user(s) said Thank You: Mioji

Re: Aw: Simple Buttons 2 years 9 months ago #62856

  • Mioji
  • Mioji's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
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 />
The administrator has disabled public write access.

Re: Aw: Simple Buttons 2 years 9 months ago #62860

  • Mioji
  • Mioji's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
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.
The administrator has disabled public write access.

Re: Aw: Simple Buttons 2 years 9 months ago #62878

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 5845
  • Thank you received: 715
  • Karma: 222
I think it's best to do in javascript, i'm sure you can do it without changing qanda.php, then can update LS.

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