Trigger showing fields after drop down menu selected

Sevil Red 101 Reputation points
2020-08-07T07:43:54.88+00:00

Good day,

I have Sharepoint List Form. I have choice drop down field "Type". The "Type" field has values "Process", "Question", "Order"...
I must show or hide some form fields when the "Type" field is changing.

If I select "Process", I must show "Field A" and hide "Field B"
If I select "Question", I must show "Field B" and hide "Field A" and "Field C"
If I select "Order", I must show "Field E" and "Field F" and hide all another fields.

I found this topic [how-to-hideshow-fields-based-on-checkbox-selection-on-newformaspx-][2][][3]

But how does look like the code for dropdown menu?

$("input[Title='Department1']").bind('click',function() { 
  if($(this).is(':checked')) {

Would be grateful

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,594 questions
0 comments No comments
{count} votes

Accepted answer
  1. Amos Wu-MSFT 4,051 Reputation points
    2020-08-10T01:59:39.857+00:00

    Code idea:After the drop-down box is changed, we display all the columns, and then hide the column according to the value of the drop-down box.code.txt

    Test Result:
    16499-test35.gif

    Tip:you need to change the title value in $("select[title='choice']) to your drop down column display name.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful