0

Hey, I have an edit form (aspx page) which is used to edit an item in a sharepoint list. What I'd like to be able to do is if a drop down box equals "declined" show up an extra field called "Reason".

I've found the following code which does something similar, if the "ShowFields" tick box is checked it shows the fields "Start Date" and "Due Date"

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>

<script>
$(document).ready(function()
{
$("input[title$='ShowFields']").click(function()
{
$("input[title$='Title']").parent('span').parent('td').parent('tr').toggle();
$("nobr:contains('Start Date')").parent('h3').parent('td').parent('tr').toggle();
$("nobr:contains('Due Date')").parent('h3').parent('td').parent('tr').toggle();
});
});
</script>

The bit I am unsure of how to do is change it so it works with a drop down box, and when it equals "Declined". I think this is the line I need to change I'm just unsure what it needs changing to!

$("input[title$='ShowFields']").click(function()

The example code was found here: http://akanoongo.blogspot.com/2008/04/how-to-hide-fields-in-sharepoint-list.html

Many Thanks

Edited by dd501: n/a

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by fxm
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.