Set the default value for disform. aspx and editform. aspx.

Source: Internet
Author: User

The default value here refers to external data, such as querystring,

1. Train of Thought. Javascript gets the value passed by querystring,

Of course, you can write it by yourself,

Provided by init. js under SharePoint layoutsGeturlkeyvalue

VaR action = geturlkeyvalue ('action ');

Helpful SharePoint JavaScript Functions

2. F12: Find the control of the field for which the default value is to be set,

In this case, the clientid may change,

Use JavaScript to obtain the control,

Gettagfromidentifierandtitle. The disadvantage is that you need to know the displayname of the field ......

Using JavaScript to manipulate a list form field

3. If you want to set the space to read-only, you need to set the attribute readonly = true instead of disable = true.

Why?

Difference between disable and readonly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.