How to display field as read-only or hide it in a form?
-
- Posts: 6
- Joined: Sat Jun 01, 2013
Hi Everyone,
How can I display these fields as read-only in a form and how can I hide them as well?
1. Single line of text.
2. Date and Time.
3. Choices.
Thank You,
Arnel
How can I display these fields as read-only in a form and how can I hide them as well?
1. Single line of text.
2. Date and Time.
3. Choices.
Thank You,
Arnel
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hello Arnel,
You have to set ReadOnly property of the fields to True:
You have to set ReadOnly property of the fields to True:
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
If you wish to hide them, just do not put them into the form with Forms Designer. If you wish to hide them dynamically based on other field values, please, visit this thread: viewtopic.php?f=4&t=26
-
- Posts: 6
- Joined: Sat Jun 01, 2013
Hi,
Yes, I already try that but its only showing blank field. I have a default value for this Date and Time field (Today's date) now its totally gone. I just wanted to make this read only so users wont be able to change it.
Thank You,
Arnel
Yes, I already try that but its only showing blank field. I have a default value for this Date and Time field (Today's date) now its totally gone. I just wanted to make this read only so users wont be able to change it.
Thank You,
Arnel
-
- Posts: 6
- Joined: Sat Jun 01, 2013
Just to confirm regarding this code below. Which part should I replace for the info of my field?
$('.fd_field[fd_name="V3Comments"]').hide();
Thank You,
Arnel
$('.fd_field[fd_name="V3Comments"]').hide();
Thank You,
Arnel
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hello Arnel,
I created a new Custom list, added Date and Time field and set default value to Today's Date in its properties:
Then I put this field into the form and set ReadOnly property to 'True':
Saved these changes for all types of form:
Here is my New form:
I created a new Custom list, added Date and Time field and set default value to Today's Date in its properties:
Then I put this field into the form and set ReadOnly property to 'True':
Saved these changes for all types of form:
Here is my New form:
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
You have to replace V3Comments with an internal name of your column.
You can read the following article to see how to get internal names of SharePoint columns: http://www.idubbs.com/blog/2012/finding ... t-columns/
You can read the following article to see how to get internal names of SharePoint columns: http://www.idubbs.com/blog/2012/finding ... t-columns/
-
- Posts: 6
- Joined: Sat Jun 01, 2013
Yes, it seems to be working now. Maybe it just need some time to propagate thats why it doesnt work before.
Thanks,
Arnel
Thanks,
Arnel
-
- Information
-
Who is online
Users browsing this forum: No registered users and 5 guests