Welcome, Guest
Username: Password: Remember me

TOPIC: Move {NAVIGATOR} links to different part of template

Move {NAVIGATOR} links to different part of template 1 year 10 months ago #88127

  • Fred
  • Fred's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 163
  • Thank you received: 5
  • Karma: 3
I tried to move the navigator buttons (next, previous) from navigator.pstpl to the endpage.pstpl, but the NEXT button didn't work anymore.

I tested this with a customized template and a standard template (mint_idea) and it was the same.

Maybe this isn't allowed?
The administrator has disabled public write access.

Re: Move {NAVIGATOR} links to different part of template 1 year 10 months ago #88223

  • Fred
  • Fred's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 163
  • Thank you received: 5
  • Karma: 3
I also tried this workaround for cloning the next/previous buttons to the progress bar div and it had the same problem: Next button doesn't work. Click it and there is no action.

docs.limesurvey.org/Workarounds%3A+Manip...vious_To_Top_Of_Page
The administrator has disabled public write access.

Re: Move {NAVIGATOR} links to different part of template 1 year 10 months ago #88282

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
At the demo you set up (not available to the public), the buttons now work fine for me. They look a little weird which is caused by the change to jquery button elements at Limesurvey 2.

You can either disable this by adding this line at the end of your template.js file:
function navbuttonsJqueryUi(){
//deactivate default jquery-ui button
}


...or alternatively copy the related CSS and jquery-custom.css and "images" folder from any of the shipped templates.
The jquery CSS should be marked:
/*** Start jQuery UI Theme Styles ***/

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'"
Last Edit: 1 year 10 months ago by Mazi.
The administrator has disabled public write access.

Re: Move {NAVIGATOR} links to different part of template 1 year 10 months ago #88345

  • Fred
  • Fred's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 163
  • Thank you received: 5
  • Karma: 3
Thanks Marcel! I didn't know about the jquery ui change for the buttons. Disabling it fixed the button problem.

I realized on the demo I sent, the problem is that the cloned buttons don't appear at all now. I am trying to use this workaround. In LS1.92 the buttons appear but the "next" button doesn't work. In LS2, the cloned buttons don't appear at all. If you inspect the elements below the progress bar, you'll see the div but it's empty.
docs.limesurvey.org/Workarounds%3A+Manip...vious_To_Top_Of_Page

Here's what I'm wondering:
1) Is it possible to display the next/previous buttons twice on the page?
2) Do the buttons have to be within the "form" tags?
The administrator has disabled public write access.

Re: Move {NAVIGATOR} links to different part of template 1 year 10 months ago #88356

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
1. I would say so and I have seen such an example (but probably based on Limesurvey 1.9x).

2. That could help but since the click just triggers a JS event, it *might* also work outside the form element (not quite sure though).

Can you provide me with login data and a copy of the template to ply around with? I need to have a look which way you added the second navigator at the template code. So please provide a link to the appropriated file as well.

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: Move {NAVIGATOR} links to different part of template 1 year 10 months ago #88383

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
I did some more research and I can confirm that all button elements have to be within the <form> tag to work properly.

It also seems to be impossible using two {NAVIGATOR} placeholders, because the second one never shows up.
Instead, you can have your own "next" (and probably also "previous") button which you can hard-code at the template files (within the <form> element):
<button class="submit" type="submit" accesskey="n" onclick="javascript:document.limesurvey.move.value = 'movenext';" value="Next" name="move2" id="movenextbtn">Next</button>

You should additionally add a line of CSS to hide this custom "next" button on the last page because otherwise, there will be the standard "submit" button plus another button names "next".

I have created a copy of the test survey ("Test survey Marcel (ID 518962)") and assigned a copy of the template for testing ("praclabnew_marcel").

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'"
Last Edit: 1 year 10 months ago by Mazi.
The administrator has disabled public write access.

Re: Move {NAVIGATOR} links to different part of template 1 year 10 months ago #88394

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6358
  • Thank you received: 824
  • Karma: 245
Mazi wrote:
I did some more research and I can confirm that all button elements have to be within the <form> tag to work properly.
To be outside the form,

Then need to submit for at click

But you can do this with a link (or another element) like this:
<a href="#" class="submit"  id="movenextbtnbis">Next</a>
<script>
  $(document).ready(function(){
    $("#movenextbtnbis").click(function(){
      $("#movenextbtn").click();
    });
  });
</script>
Last Edit: 1 year 10 months ago by DenisChenu.
The administrator has disabled public write access.

Re: Move {NAVIGATOR} links to different part of template 1 year 10 months ago #88398

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
I agree, you can only place such elements outside the form tag if you use some additional JS to trigger the click event.

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: Move {NAVIGATOR} links to different part of template 1 year 10 months ago #88429

  • Fred
  • Fred's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 163
  • Thank you received: 5
  • Karma: 3
These are some great ideas! I will try these out.

There are definitely some differences between 1.92 and 2.0+ in how this works. I am going to focus on 2.0 since that is the future we hope.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.135 seconds
Donation Image