How to show/hide fields based on the value of a Yes/No (Checkbox) field?

Hello,

How can I show/hide a field in my form based on the value of a Yes/No (Checkbox) field: If the checkbox field is checked, so the relative field is shown, else it is kept hidden?

Thank you.
pgirardierAsked:
Who is Participating?
 
Uday EthirajuluConnect With a Mentor CTOCommented:
Refer this : http://spff.codeplex.com/

retreive teh field and change teh visibility using jquery.

Thanks,
~Uday
http://www.mstechblogs.com/sharepoint
http://www.mstechblogs.com/Forums
0
 
Uday EthirajuluCTOCommented:
0
 
pgirardierAuthor Commented:
bhagavan2uday, thank you for your quick reply.

And how can I do if I want to replace the hidden row by another custom row?
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
Uday EthirajuluCTOCommented:
using parent

e.g.
$("input[title$='Title']").parent('span').parent('td').parent('tr')


you get the reference of parent html data, then replace the html for tr with your custom html

Thanks,
~Uday
0
 
Justin ImesFull Time SharePoint JediCommented:
have you looked into infopath? this can easily be done using infopath and connected to a sharepoint list.
0
 
pgirardierAuthor Commented:
bhagavan2uday:
Let me explain more through the joined image:
- When "workspace" checkbox is unchecked, the next row, which contains documents, is shown (as it is illustrated in the joined image).
- Now, if the user checks "workspace" checkbox, I want that only the right part (the table) of the documents row becomes hidden and this table is replaced by a simple text (a message).

jimes82:
- I don't have any idea about InfoPath and how to use it. Thank you for explaining more your solution if it is possible.

Thanks.
screenshot.png
0
 
Justin ImesFull Time SharePoint JediCommented:
infopath is Microsoft's forms based tool, it comes in certain office suites, so you may already have it.  It connects nicely with sharepoint and can use existing lists or create new ones.  You can make custom designed forms to match your sharepoint and if you have MOSS, you can even do browser based forms which is really nice, but if you only have WSS each user will need a copy of infopath installed in order to submit.

but when you create a form and add your controls you can create sections in the form, then you can create a rule and add it to the section, the rule will specify a condition and you can make the section hidden until it satisfies the condition.

for instance: condition: if approval 'is not equal to' denied HIDE this control, so the drop down for approval will be a single field until someone selects denied, then a hidden field will appear to add a denied comment....
0
 
pgirardierAuthor Commented:
Thank you.
0
All Courses

From novice to tech pro — start learning today.