A Developer's Diary
ISSUE: I am customizing the EditForm.aspx file and have added an HTML Table Tag. Moreover, when I set the "ID" attribute for the HTML TABLE Tag and save the page, SharePoint keeps on appending the following {generate-id()} . How can I get rid of this, since I am not able to call HTML by ID due to this stuff that SharePoint appends.
SOLUTION: SharePoint appends the following: {generate-id()} onto HTML element within the body of the form, whose "ID" attribute has been set. Moreover when the HTML element is rendered onto the page, its ID attribute would contain a 6 character string appended.
<input type="text" id="tbLuckyNumberID0EAAA" value="23">
- You must create a dummy parameter
- Append the dummy parameter to the ID attribute
EXAMPLE:
- In the below example, I have set the ID attribute on an HTML TD Tag and an HTML INPUT Tag

- Once you save the file, you will notice that SharePoint appends its evil code

- Hence, you must create a dummy paramter

- And finally, you must append to the ID attribute you own evil code

- Moreover when the HTML element is rendered onto the page, its ID attribute has rendered as per your own code.
<input type="text" id="tbLuckyNumber" value="23">
- Let me know if it helps. ;)
|
|
|
|