locked
How to add static html text to New Item form in sharepoint List RRS feed

  • Question

  • I have New Item Form where Under Title column I need add some static text sentence using javascript. Anyone know how to do this?
    Wednesday, June 13, 2018 4:40 PM

Answers

  • I was waiting for any response but at the end , I have created script. It might be useful for others. :)

    var textYes = "<div></br></br><nobr><span>your Text</span></nobr></div>"; 

     $("#Title").after(textYes);

    Regards,

    Shraddha07

    • Marked as answer by Shraddha07 Thursday, July 12, 2018 6:46 PM
    Thursday, June 14, 2018 4:10 PM

All replies

  • Hi Shraddha,

    Use multiline of text column with enhanced Rich text editor type and then you can use embed code in rich HTML test editor.

    Best Regards,

    Soni K

    Wednesday, June 13, 2018 4:46 PM
  • Also by column settings only you can set some static default value either Text or calculated value to any of the column.Which version of SharePoint you are using ?

    Wednesday, June 13, 2018 4:54 PM
  • Hi Soni,

    Thanks for your reply.

    But I don't want to set any static text to any column.

    I want to show static text below Title column row in new Item form.

    Regards,

    Shraddha

    Wednesday, June 13, 2018 5:07 PM
  • Hi Shraddha,

    So in that case you can add Content editor webpart on the newform.aspx  by editing it and then you can use java script or Jquery to show static text.

    Best Regards,

    Soni K 

    Wednesday, June 13, 2018 10:47 PM
  • Yes You are right and know this thing but even I made some script but I want some solution/ script if you have .. .. As my scripts are not working..
    Thursday, June 14, 2018 1:38 PM
  • I was waiting for any response but at the end , I have created script. It might be useful for others. :)

    var textYes = "<div></br></br><nobr><span>your Text</span></nobr></div>"; 

     $("#Title").after(textYes);

    Regards,

    Shraddha07

    • Marked as answer by Shraddha07 Thursday, July 12, 2018 6:46 PM
    Thursday, June 14, 2018 4:10 PM