cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Hide/Show a wizard step based on type selected

Highlighted

Hide/Show a wizard step based on type selected

Hi all,


I want to hide/show Step 2 of a wizard based on the type selected in Step 1. Have anyone done anything similar in javascript? Any help is appreciated.


1 REPLY 1
Highlighted

Re: Hide/Show a wizard step based on type selected

Hi Praseeth Moothedath

You question is not clear to me as which wizard your taking about - New Part wizard, New Change Request wizard or some other.

I recently work on such requirement where I wanted to hide/show Affected Objects wizard step for one of sub type. And I add below JavaScript to "<WT_HOME>\codebase\netmarkets\jsp\changeRequest\create.jsp" file and it worked for:

<script language="JavaScript">

  PTC.driverAttributes.on("afterRefresh",function() {

      customToggleCreateCADDocStep('affectedDataStep');

    });

  // wizard step should be in format type.action

  function customToggleCreateCADDocStep(wizardStep) {

  var type_beingCreated = document.getElementById("createType").value;

  var allowed_type1 = "wt.change2.WTChangeRequest2";

  var allowed_type2 = "wt.change2.WTChangeRequest2|com.ptc.ptcnet.SubTypeTest1";

  if (type_beingCreated == allowed_type1 || type_beingCreated == allowed_type2) {

       insertStep(wizardStep);

  } else {

       removeStep(wizardStep)

  }

  }

</script>

Thanks,

Shirish

Announcements