0

I'm wondering how to achieve this via custom web part and JavaScript

I'm looking for a way on how to limit the dropdown status based on its current state. For example I have status: Start, On-Going, Completed and Pending

the initial status of Start must only have On-Going as its option.

1 Answers1

0

jQuery - $('#idofyourdropdown option[value="On-Going"]''); OR

$('#idofyourdropdown option:contains("On-Going")');

OR using index asssuming On-Going is hte first option

$('#idofyourdropdown option:eq(1)').prop('selected', true);

OR even this

$('#idofyourdropdown').val('On-Going');
  • This actually helps me with the initial value. :) How about limiting the status option? For example a status of "Pending" then I click "Ok" button. When I edit the item I should have "Pending, Completed, Rejected" as my only option "On-Going" should not be an option. – TheGreenGentleman Jan 16 '14 at 16:33