Scroll to specific field

Forums General discussion Scroll to specific field

Viewing 1 reply thread
  • Author
    Posts
    • #31998
      HYM
      Participant

      Hi Alex, i’m trying to use jquery .scroll() API on dffs form to make sure that user will be scrolled down in case he missed to add mew item to a vLookup but it’s not working.
      any suggestions?

    • #32024
      Alexander Bautz
      Keymaster

      Hi,
      You can use something like this in your custom js:

      function scrollToField(fin){
          var container = jQuery("#s4-workspace")
          container.animate({
              "scrollTop": jQuery("#dffs_" + fin).offset().top - container.offset().top + container.scrollTop()
          });
      }

      Now you can scroll to a selected field by using this function call:

      scrollToField("Your_Field_Internal_Name");

      Alexander

Viewing 1 reply thread
  • You must be logged in to reply to this topic.