Move {NAVIGATOR} links to different part of template

More
4 years 8 months ago #88127 by Fred01
Fred01 created the topic: Move {NAVIGATOR} links to different part of template
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?

Please Log in to join the conversation.

More
4 years 8 months ago #88223 by Fred01
Fred01 replied the topic: Move {NAVIGATOR} links to different part of template
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

Please Log in to join the conversation.

More
4 years 8 months ago - 4 years 8 months ago #88282 by Mazi
Mazi replied the topic: Move {NAVIGATOR} links to different part of template
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)survey-consulting.com'"
Last Edit: 4 years 8 months ago by Mazi.

Please Log in to join the conversation.

More
4 years 8 months ago #88345 by Fred01
Fred01 replied the topic: Move {NAVIGATOR} links to different part of template
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?

Please Log in to join the conversation.

More
4 years 8 months ago #88356 by Mazi
Mazi replied the topic: Move {NAVIGATOR} links to different part of template
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)survey-consulting.com'"

Please Log in to join the conversation.

More
4 years 8 months ago - 4 years 8 months ago #88383 by Mazi
Mazi replied the topic: Move {NAVIGATOR} links to different part of template
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)survey-consulting.com'"
Last Edit: 4 years 8 months ago by Mazi.

Please Log in to join the conversation.

More
4 years 8 months ago - 4 years 8 months ago #88394 by DenisChenu
DenisChenu replied the topic: Move {NAVIGATOR} links to different part of template

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>

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).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 4 years 8 months ago by DenisChenu.

Please Log in to join the conversation.

More
4 years 8 months ago #88398 by Mazi
Mazi replied the topic: Move {NAVIGATOR} links to different part of template
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)survey-consulting.com'"

Please Log in to join the conversation.

More
4 years 8 months ago #88429 by Fred01
Fred01 replied the topic: Move {NAVIGATOR} links to different part of template
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.

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now