I have a list that has fields like, name, position, year of birth. This information is stored in a database (read only).

When a user opens list's form (an OOTB form) , I want to go to the database, get the information and fill the fields. My workaround is to make a webpart that will get the information and then add javascript code like:

< script >
 var name = "myname";
 var postion = "thatposition"
< /script>

Then, a jquery will get these values, fill up the textboxes and make them readonly.

I wonder if there's another way. Javaqscript that talks to the sql server directly is not feasible.

  • Can you use InfoPath? Commented Sep 10, 2014 at 16:58
  • I prefer NOT to use Infopath.
    – XristosK
    Commented Sep 10, 2014 at 19:05

1 Answer 1


Exposing the data sources directly through JavaScript is not recommended. You can customize the form using InfoPath or a Visual Webpart and replace the new item form with the visual webpart.

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.