You are viewing limited content. For full access, please sign in.

Question

Question

How can I move the submit button?

asked on August 30, 2018

I have a form with multiple tables on it. I would like to move the Submit button to be above one of the tables. I am sure this can be done with either CSS or JS, but unfortunately I do not know either. Can someone please help me to figure out what command is needed to move the submit button to be above a table?

 

 

0 0

Replies

replied on August 30, 2018

We've managed to do it with this JS syntax:

 

$('#q124').before($('.action-btn'))

 

Just replace the selector by the one of your table, I think you can play with the before/after setting.

We've tried with CSS but the button often move depending on the size of the screen from a user to another.

0 0
replied on August 30, 2018

I appreciate your response. However, I must be missing something, because I cannot get it to work. I used the id in the screengrab below in your script

$('#q2').before($('.action-btn'));

 

and it didn't make any change when I put it in the Javascript section. I tried several other different IDs as well, but the submit button never moved. I am not sure what I am missing.

0 0
replied on August 30, 2018

Mike,

Try this full syntax:

$(document).ready(function() {
    $('#q2').before($('.action-btn'));
});

to ensure that all the elements of the page have loaded before the JavaScript fires.

1 0
replied on August 31, 2018

Thank you for this script. I was able to get it working now.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.