Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sharepoint: How to enable a field when a check box is selected on new item form?

Status
Not open for further replies.

pho01

Programmer
Mar 17, 2003
218
US

In Sharepoint, I need modify a new item form of a list to make a field visible/invisible when a check box is selected:

For example:
There is a checkbox field called "Is XYZ affected?"

When a user selects this field, it will make a hidden field visible "Impact details:"

If "Is XYZ affected?" field is not checked, then "Impact details:" field is invisible.

This is easy to do it in html using javascript, how do I do it on Sharepoint?

Thanks!
 
I'm assuming you are running SharePoint 2010 or 13.

You can do this with SharePoint Designer or InfoPath, no need or HTML or javascript editing. Using InfoPath makes it real easy, but you have to watch out for what version of Office your users are running.

More info on InfoPath and list forms:

Using SPD to show / hide fields:
Start here:

Then look at conditional formatting:


 
thank you ehaze,

I customize the forms in Infopath, add rules, etc... everything is working in the preview of Infopath, but when i published the form to Sharepoint 2010, the rules are not working. Click customize form again to check it in Infopath, the rules are still there...and working in Infopath, but not in sharepoint. it doesn't fire the rule to hide/display the text box when the checkbox is checked. what's wrong? I checked both IE and Chrome, none worked.

For SPD, conditional formatting doesn't allow me to add new clause, only advanced option available, and I don't know how to hide a field using advanced option.

Help again, please!
 
Are you sure your InfoPath form is being published to the SharePoint list?

On the InfoPath form, add a label and change the text.
Publish the form to SharePoint.

Check to see that the label is visible in SharePoint.

*NOTE*
If someone was to modify the list in datasheet view, the rules will not run.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top