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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Uday EthirajuluCTOCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.