1

I have a list of requests and I want to restrict the users from skipping a Status, so if the list item is at Status 3 they can only change it to 4.

This is because everytime the request moves to the next Status, the date is logged. If a Status is skipped then the KPIs make no sense!

I only have client side functionality so if the answer is no please let me know!

Status screenshot

1 Answer 1

0

If you have javascript skills, you could use javascript to filter the dropdown list based on logic.

For example, you could put this in a content editor web part on the page (below the edit form web part):

<script type="text/javascript">
  var dropdown = document.getElementById("ctlid000-blahblah");

  // Find the selected status. 
  var selectedItem = dropdown.options[dropdown.selectedIndex].value;

  // Logic for if the selected item is draft.
  if (selectedItem == "1")
  {
      foreach(var opt in dropdown.options) {
         // remove the draft option.
         // You can remove whichever other items you want too.
        if (opt.value == "1")
         {
           dropdown.remove(opt);
         }
      }
  }
</ script>

To add webparts to the EditForm.aspx, you can simple add "&ToolPaneView=2" to the Url.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.