0

I'm attempting to use jQuery to relocate fields on a list's New Item form. I want some of the text and checkbox fields to appear between radio selections. I created and edited a customer New Item form in Designer, surrounding the fields to be moved with an IDed Table, and I added a Content Editor link to a TXT file with the script below.

My solution works fine from my admin account. But all the other users see the form with the original layout. In the code below, "#radio-button-label" is a stand-in for the SP-assigned ID for the form element.

$(document).ready(function() {
    $("#table-to-move").insertAfter($("#radio-button-label").closest('tr'));
});

Could the issue be one of permissions? The jQuery library is hosted directly on the site.

1
  • If it works fine from your admin account (or even from your non-admin account, if you were the one that uploaded the jQuery and script files), and not for other users, then yes, it does sound like a permissions issue. Make sure that all users have read permissions to the library and folder where both jQuery and your script file are, and that both files are checked in. Commented Oct 28, 2020 at 15:14

1 Answer 1

0

I think I found the problem. The long alphanumeric strings that SP assigns as form field IDs appear to be specific to the user. So I located the SPAN tags by title text and the script appears to work as designed for other users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.