Did You Know: Adding Anchors/Bookmarks into Your Large Nintex Form

A common scenario with third-party type form builders is that it is never quite as easy as you think to do simple things that you could do in HTML. Unless, of course, there is a purpose build function for it.

Now working with the Nintex Forms and the SharePoint WYSIWYG there is no exception. So when a question came through this morning, about adding HTML anchors in Nintex Forms, I had to have a go at it.

The first issue I came across was that we are working in a DIV, not a window.  So we had to work inside the DIV. So, let me show how I went about putting this in. Just to be clear, because I”m using custom JavaScript this will not work in Nintex Mobile.

So, first things first. Let’s get the script in.

Open up the Forms Designer and select “Settings” expand out the “Custom Javascript” menu. Paste in:

nintex workflow

nintex

This script is taking advantage of the jQuery Library already loaded for Nintex Forms, and using the jQuery function “scrollTop

Now for my form, I need to go down 5000px to the bottom. So in the JavaScript, you will see in the example above I have 200 against the ‘moveBottom’ class. I will be changing this to 5000 from 200. You just need to adjust this to suit your form. ‘moveTop’ shouldn’t need to change from 0, unless of course ‘Top’ isn’t right at the top but maybe 100px down.

The next thing we need to do is add the links into the form.  Place a ‘Label’ control on the form and attach the CSS class ‘moveBottom’ in the ribbon. You will notice that the classes we are attaching to the control are referenced in the JavaScript.

nintex

Repeat this process for the bottom link as well.

nintex

That’s it! Publish out your form and try it out for yourself.

 

Visit the Nintex Community today to learn more and engage in conversations with fellow Nintex users! 

 

Dan Stoll

Dan Stoll has nearly two decades of IT experience and currently serves as Senior Technical Marketing Manager at Nintex, the world’s leader in Intelligent Process Automation (IPA). He has spent the last 10 years of his career helping organizations turn manual processes into well-run automated ones. Originally from Australia, Stoll relocated to the United States in 2015 after working as a Nintex technical evangelist for the company’s APAC and EMEA regions. Follow Dan on Twitter: @_danstoll.