none
Custom List Workflow sending an email with field update link RRS feed

  • Question

  • Dear Sharepoint Community.

    I've got such a case...

    I have a custom list with Column named Status with choice: To be decided; Accepted; Rejected; Closed.

    I'd like to create custom Edit form to with the Status field, but with choice limited only to Accept. Is it possible?

    Kind Regards

    Monday, May 9, 2016 2:23 PM

Answers

All replies

  • Add the below code in a content editor web part and place it in the editform. This requires jQuery.

    $(document).ready(function() {
        //Status is the field display name
        $('select[title="Status"] :not(option[value="Accepted"])').remove()
    });


    NLV
    MCTS - Blog - Twitter - Linked In

    Monday, May 9, 2016 3:27 PM
  • Hi,

    Here you no need to create separate Edit Form for to just hide some of the options from your single column. AS NLV told you can add the content editor webpart and append the Jquery to achieve this. Here is another example for the same.

    Steps: Go to List’s Edit Form by replacing “AllItem.aspx” to “EditForm.aspx” in URL to navigate to List’s Edit form. Like below

    Lists/ChoiceTestListName/EditForm.aspx

    Go to site setting àEdit Page àadd webpart àContendEditor webpart from Media and Content category, copy the below code and paste, save the page and you are good. I tested it with same value that we have with Status column Name, change your column Name if you have different

    <script   src="https://code.jquery.com/jquery-1.12.3.min.js"   integrity="sha256-aaODHAgvwQW1bFOGXMeX+pC4PZIPsvn2h1sArYOhgXQ="   crossorigin="anonymous"></script>

    <script language="javascript" type="text/javascript">

    $(document).ready( function() {

      var dropdown = $(":input[title='Status']");//Name of your choice columm

        dropdown.find("option[value='Decided']").remove();//value that you dont want to show, remove

      dropdown.find("option[value='Rejected']").remove();

    dropdown.find("option[value='Closed']").remove();

    });

    </script>


    KRISHANA KUMAR

    SharePoint Architect

    Mosstechnet-kk.com

     

    Please click "Mark As Answer" if this post solves your problem or "Vote As Helpful" if it was useful

    Monday, May 9, 2016 4:10 PM
  • Hi piesekleszek,

    According to your description, you want to limit the choice to Accept in edit form.

    You can use lookup column or calculated column to copy the value in choice column.

    Then display these column in edit form and hide the choice column.

    Please refer to the link for details:

    https://bramnuyts.wordpress.com/2011/04/05/using-a-lookup-field-on-a-choice-field-workaround/

    Best Regards,

    CY


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Tuesday, May 10, 2016 8:31 AM
    Moderator
  • Yes.you can do this with customization.

    $('select[title="Status"] :not(option[value="Rejected"])').remove()

    $('select[title="Status"] :not(option[value="Closed"])').remove()

    Tuesday, May 10, 2016 8:47 AM
  • Thank You for all Your responses;-) I'll check it but it seems that I see the exact answer for my need.

    Kind Regards

    P.

    Thursday, May 12, 2016 9:22 AM
  • Hello piesekleszek,

    Could you share your answer if you would have resolved your issue?

    It will be helpful to others. Thanks!:)

    Best Regards,

    CY


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, May 12, 2016 9:27 AM
    Moderator
  • Dear Community

    This one worked for me:

    $(document).ready(function() {
       
    //Status is the field display name
        $
    ('select[title="Status"] :not(option[value="Accepted"])').remove()
    });

    Tuesday, June 7, 2016 10:47 AM