We have a multi page form and on the last page we want to move the final submit button above the previous page button. Is there a way to do this that I'm missing?
I tried to mess with it for a bit but the issue is you have to change the order of the code then repost it in the custom section of the form. At the same time you have to hide the second button. I made an attempt to do it but I can't hide the button. http://www.tfaforms.com/189818
</form></div> I added this to the custom section. This has the button BEFORE the question but I had to give it the same ID as the normal submit button. Normally when I need to hide the submit button I would use this: <style type="text/css"> .primaryAction {display: none; } </style>
The problem here is it will also hide the button I put in the custom area.
The bigger question to ask: Why do you want to move the submit button so it isn't the last thing on the page? Putting it above anything else will make it more likely someone will click on it by mistake. (IMHO)
This works but messes up the styling sheet. You may need to play with it more but you can get the idea of what I'm trying to do. This is advanced coding so proceed at your own risk.
If Martin's solution doesn't meet your needs, you could also try this:
1. Add to your custom code block this code: <script> document.addEventListener('DOMContentLoaded',function(){ var actions = base2.DOM.Element.querySelector(document,'.actions'); //console.log(actions.previousElementSibling.lastChild); //This line shouldn't be here. actions.previousElementSibling.appendChild(actions); },false); </script>
2. Once you view the form, the submit button will be moved as you described. Here's an example: http://www.tfaforms.com/202246
I do have the Web Developer toolbar installed. I ran a CSS check and got this link for you to look at: http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=http%3A%2F%2Fwww.tfaforms.com%2F202246
Haha, no, it's the broken CSS that's necessary to support IE6-9, Safari, Chrome and Firefox 3-4 all at the same time.
Instead, sillyily enough, it was that I left a line of debugging code in my 5 line javascript statement ( the console.log call) . The corrected code is:
<script> document.addEventListener('DOMContentLoaded',function(){ var actions = base2.DOM.Element.querySelector(document,'.actions'); actions.previousElementSibling.appendChild(actions); },false); </script>