• Isaac Gomolka
  • NEWBIE
  • 45 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 15
    Replies
Hi everyone, I need to use apex code to assign a picklist option value to a certain user's field. Basically im automatically creatinga  new user using apex, and so its automatically assigning a bunch of the fields. Some of those fields are picklists and are required to create a new User. So im wondering how to / whats the code for assigning a specific picklist option. Like how do I get that specific options ID or something. Thanks for the help!

For example, this is basically what I need to do, just don't know how.

newUser.LocaleSidKey = picklistName.picklistOption;
Hi. I was wondering how/ whats the best way to do this: I need like an inputfield box or something on my Visualforce page where someone can type in a User ( preferably the Name like "Matt Smith", but could also be username or nickname or something). And that then makes sure that there is a user by that name in the Salesforce sandbox so that I can see that searched for User's information. I need this because I need to make something that will take that User the person searched for, and create a new User cloning that looked up user's profile, permission sets, etc(more detailed, but not important). So i need a way to search for a user and then be able to pull information from that user to use later when making a new User. Im sorry if this is stupid or confusing, I'm still new to Salesforce and could really use some help. Please and thank you soooo much!
Hi, I was wondering how to get a Lookup field for Users onto a visualforce page. I tried finding something on this, but nobody uses it with Users, they use accounts or opportunities. I want to be able to have an inputField with the lookup button thing next to it so whoever is using my visualforce page can click on it and lookup a User that we have in Salesforce and select it. If you could also help explain how I would then be able to pull information from the user selected, thatd be a great help. By that i mean like I'm supposed to be copying information of a User that someone inputs to use to create a new user. Any help or explanations would be very very helpful. Thanks!!!
Hi everyone. I have been trying to figure out this test class for my extension class, but ive been struggling with it for 2 weeks. I have a test class that runs, but I'm not sure if it truly verifies everything its supposed to. I have been told by some that it is enough, and by others I've been told its not good enough and I should have a method for every possibility of combinations of my picklists Yes/No 's( I have 3 picklists). Can somebody please help me by sending me code for what my test class should look like. I've been having trouble with this for so long, I just need to get this down. Thank you so much.

I've already been linked out to all the salesforce pages explaining test classes and test classes with extensions and all that, I'm still confused, so seeing the code would help me a lot more than links. Thank you all so much for the help in advanced!

Extension class:
public with sharing class EscalationPageExtension { 
    
    public String picklist1{get;set;}
    public String picklist2{get;set;}
    public String picklist3{get;set;}
   
    private ApexPages.StandardController ctrl;
    public EscalationPageExtension(ApexPages.StandardController controller)
    {
        ctrl = controller;    
    }
    
    public List<SelectOption> options { get; private set; }
    {
    options = new List<SelectOption>();
    options.add(new SelectOption('', '-Select-')); // ==> option null
    options.add(new SelectOption('false', 'No'));
    options.add(new SelectOption('true', 'Yes'));
    }
    
    
    public void setDataIntegrity()
    {
        Case cas = (Case)ctrl.getRecord();
        cas.Escalation_Data_Integrity__c = Boolean.valueof(picklist1); 
    }
    
    public void setViableWorkaround()
    {
        Case cas = (Case)ctrl.getRecord();
        cas.Escalation_Viable_Workaround__c = Boolean.valueof(picklist2);
    }
    
    public void setAppFunction()
    {
        Case cas = (Case)ctrl.getRecord();
        cas.Escalation_Application_Functionality__c = Boolean.valueof(picklist3);
    }
}

Visualforce Page:
<apex:page standardController="Case" extensions="EscalationPageExtension"><!-- We should keep sidebars and headers to give them a way out -->
    <apex:pageBlock title="{!$User.FirstName}, Answer Questions to Escalate Case.">
    
    <apex:form id="formID">
      
      <h1>How many users are affected?</h1>
      <apex:inputField value="{! Case.Escalation_Users_Affected__c }" required="true"/>
    
      <br/>
      <h1>Does this affect data integrity?</h1>
      <apex:actionRegion >
          <apex:outputPanel styleClass="requiredInput" layout="block">
          <apex:outputPanel styleClass="requiredBlock" layout="block"/>
          <apex:selectList value="{!picklist1}" size="1" required="true">
          <apex:actionSupport event="onchange" rerender="hidepanel1" action="{!setDataIntegrity}"/>
          <apex:selectOptions value="{!options}" />
          </apex:selectList>
          </apex:outputPanel>
      </apex:actionRegion>
      <br/>
      <apex:outputPanel id="hidepanel1">
      <apex:outputText value="How?" style="display:{!if(picklist1=='true', 'block', 'none')}"/>
      <apex:inputField value="{!Case.Escalation_Data_Integrity_Explain__c}" required="{!picklist1}" style="display:{!if(picklist1=='true', 'block; width:250px; height:75px;', 'none')}"/>
      <!-- <apex:inputCheckbox value="{!Case.Escalation_Data_Integrity__c}" selected="true" style="display:none;" rendered="{!picklist1}"/> -->
      </apex:outputPanel>
      
      <br/> <br/>
      <h1>Do you have a viable workaround?</h1>
      <apex:actionRegion >
          <apex:outputPanel styleClass="requiredInput" layout="block">
          <apex:outputPanel styleClass="requiredBlock" layout="block"/>
          <apex:selectList value="{!picklist2}" size="1" required="true">
          <apex:actionSupport event="onchange" rerender="hidepanel2" action="{!setViableWorkaround}"/>
          <apex:selectOptions value="{!options}" />
          </apex:selectList>
          </apex:outputPanel>
      </apex:actionRegion>
      <br/>
      <apex:outputPanel id="hidepanel2">
      <apex:outputText value="What is the viable workround?" style="display:{!if(picklist2=='true', 'block','none')}"/>
      <apex:inputField value="{!Case.Escalation_Viable_Workaround_Explain__c}" required="{!picklist2}" style="display:{!if(picklist2=='true', 'block; width:250px; height:75px;', 'none')}" />
      <!-- <apex:inputCheckbox value="{!Case.Escalation_Viable_Workaround__c}" selected="true" style="display:none;" rendered="{!picklist2}"/> -->
      </apex:outputPanel>
    
      <br/> <br/>
      <h1>Does this affect critical application functionality?</h1>
      <apex:actionRegion >
          <apex:outputPanel styleClass="requiredInput" layout="block">
          <apex:outputPanel styleClass="requiredBlock" layout="block"/>
          <apex:selectList value="{!picklist3}" size="1" required="true">
          <apex:actionSupport event="onchange" rerender="hidepanel3" action="{!setAppFunction}"/>
          <apex:selectOptions value="{!options}" />
          </apex:selectList>
          </apex:outputPanel>
      </apex:actionRegion>
      <br/>
      <apex:outputPanel id="hidepanel3">
      <apex:outputText value="How?" style="display:{!if(picklist3=='true', 'block','none')}"/>
      <apex:inputField value="{!Case.Escalation_App_Functionality_Explain__c}" required="{!picklist3}" style="display:{!if(picklist3=='true', 'block; width:250px; height:75px;', 'none')}" />
      <!-- <apex:inputCheckbox value="{!Case.Escalation_Application_Functionality__c}" selected="true" style="display:none;" rendered="{!picklist3}"/> -->
      </apex:outputPanel>
      
      <br/> <br/>
      <h1>What business functionality are you unable to perform?</h1>
      <br/>
      <apex:inputField value="{! Case.Escalation_Business_Functionality__c }"  style="width: 300px; height: 100px" required="true"/>
      
      <br/> <br/> <br/>
      <apex:inputCheckbox value="{!Case.IsEscalated}" selected="true" style="display:none;"/>
      <apex:commandButton action="{!save}" value="Submit" />
      
    </apex:form>  
    </apex:pageBlock>   
</apex:page>

My current Test Class:
@isTest 
public class EscalationPageExtensionTest 
{
    static testMethod void testMethod1() 
    {
    
        Case cas = new Case(Status ='New', Priority = 'Medium', Origin = 'Email');
        insert cas;
        

        Test.StartTest(); 
            ApexPages.StandardController sc = new ApexPages.StandardController(cas);
            EscalationPageExtension  testObj = new EscalationPageExtension(sc);
        
            testObj.picklist1 = 'true';
            testObj.picklist2 = 'true';
            testObj.picklist3 = 'true';
            cas.Escalation_Users_Affected__c = '123';
            cas.Escalation_Business_Functionality__c = 'The Business Functionality I cant perform is....';
            
            testObj.setDataIntegrity();
            System.assertEquals(cas.Escalation_Data_Integrity__c, true);
            cas.Escalation_Data_Integrity_Explain__c = 'Affects Data Integrity by...';
            
            testObj.setViableWorkaround();
            System.assertEquals(cas.Escalation_Viable_Workaround__c, true);
            cas.Escalation_Viable_Workaround_Explain__c = 'The Viable Workaround is...';
        
            testObj.setAppFunction();
            System.assertEquals(cas.Escalation_Application_Functionality__c, true);
            cas.Escalation_App_Functionality_Explain__c = 'Affects Application Functionality by...';
            
            List<SelectOption> lstOptions  = testObj.options;
            System.assert(lstOptions.size() > 0 );
            
            sc.save();
            List<Case> lstCase = [select id,Escalation_Application_Functionality__c from case where id =:cas.id ];
            System.assert(lstCase.size() > 0 );
            System.assertEquals(lstCase[0].Escalation_Application_Functionality__c , true ); 

        Test.StopTest();
    }
}

Again I'm not sure if that test class verifies enough. I have been told to make a seperate method tht runs for every cmobination of picklists to try to test every possibility, but im not sure if that is necessary. Please Help, i really need it. Thank you so much!

Isaac​
Hi everybody, I have been struggling trying to make a test class for the extension class I have made. I would really greatly appreciate it if someone could show me what my test class would be. I have tried to get help before but people just send me the salesforce link explaining a test class with extensions, but I have read it and still don't understand. I have done tons of research, but just don't get test classes. Seeing how this test class would look would greatly help me understand it as well. 

Thanks for the help in advanced!
-Isaac

Extension Class:
***************************************************************
 * Used for the Visualforce page Escalation Question Page
 * Created by Isaac Gomolka
 * 7/13/2017
 * ************************************************************/

public with sharing class EscalationPageExtension { 
    
    public String picklist1{get;set;}
    public String picklist2{get;set;}
    public String picklist3{get;set;}
   
    private ApexPages.StandardController ctrl;
    public EscalationPageExtension(ApexPages.StandardController controller)
    {
        ctrl = controller;    
    }
    
    public List<SelectOption> options { get; private set; }
    {
    options = new List<SelectOption>();
    options.add(new SelectOption('', '-Select-')); // ==> option null
    options.add(new SelectOption('false', 'No'));
    options.add(new SelectOption('true', 'Yes'));
    }
    
    
    public void setDataIntegrity()
    {
        Case cas = (Case)ctrl.getRecord();
        cas.Escalation_Data_Integrity__c = Boolean.valueof(picklist1); 
    }
    
    public void setViableWorkaround()
    {
        Case cas = (Case)ctrl.getRecord();
        cas.Escalation_Viable_Workaround__c = Boolean.valueof(picklist2);
    }
    
    public void setAppFunction()
    {
        Case cas = (Case)ctrl.getRecord();
        cas.Escalation_Application_Functionality__c = Boolean.valueof(picklist3);
    }
}

Visualforce Page:
<apex:page standardController="Case" extensions="EscalationPageExtension"><!-- We should keep sidebars and headers to give them a way out -->
    <apex:pageBlock title="{!$User.FirstName}, Answer Questions to Escalate Case.">
    
    <apex:form id="formID">
      
      <h1>How many users are affected?</h1>
      <apex:inputField value="{! Case.Escalation_Users_Affected__c }" required="true"/>
    
      <br/>
      <h1>Does this affect data integrity?</h1>
      <apex:actionRegion >
          <apex:outputPanel styleClass="requiredInput" layout="block">
          <apex:outputPanel styleClass="requiredBlock" layout="block"/>
          <apex:selectList value="{!picklist1}" size="1" required="true">
          <apex:actionSupport event="onchange" rerender="hidepanel1" action="{!setDataIntegrity}"/>
          <apex:selectOptions value="{!options}" />
          </apex:selectList>
          </apex:outputPanel>
      </apex:actionRegion>
      <br/>
      <apex:outputPanel id="hidepanel1">
      <apex:outputText value="How?" style="display:{!if(picklist1=='true', 'block', 'none')}"/>
      <apex:inputField value="{!Case.Escalation_Data_Integrity_Explain__c}" required="{!picklist1}" style="display:{!if(picklist1=='true', 'block; width:250px; height:75px;', 'none')}"/>
      <!-- <apex:inputCheckbox value="{!Case.Escalation_Data_Integrity__c}" selected="true" style="display:none;" rendered="{!picklist1}"/> -->
      </apex:outputPanel>
      
      <br/> <br/>
      <h1>Do you have a viable workaround?</h1>
      <apex:actionRegion >
          <apex:outputPanel styleClass="requiredInput" layout="block">
          <apex:outputPanel styleClass="requiredBlock" layout="block"/>
          <apex:selectList value="{!picklist2}" size="1" required="true">
          <apex:actionSupport event="onchange" rerender="hidepanel2" action="{!setViableWorkaround}"/>
          <apex:selectOptions value="{!options}" />
          </apex:selectList>
          </apex:outputPanel>
      </apex:actionRegion>
      <br/>
      <apex:outputPanel id="hidepanel2">
      <apex:outputText value="What is the viable workround?" style="display:{!if(picklist2=='true', 'block','none')}"/>
      <apex:inputField value="{!Case.Escalation_Viable_Workaround_Explain__c}" required="{!picklist2}" style="display:{!if(picklist2=='true', 'block; width:250px; height:75px;', 'none')}" />
      <!-- <apex:inputCheckbox value="{!Case.Escalation_Viable_Workaround__c}" selected="true" style="display:none;" rendered="{!picklist2}"/> -->
      </apex:outputPanel>
    
      <br/> <br/>
      <h1>Does this affect critical application functionality?</h1>
      <apex:actionRegion >
          <apex:outputPanel styleClass="requiredInput" layout="block">
          <apex:outputPanel styleClass="requiredBlock" layout="block"/>
          <apex:selectList value="{!picklist3}" size="1" required="true">
          <apex:actionSupport event="onchange" rerender="hidepanel3" action="{!setAppFunction}"/>
          <apex:selectOptions value="{!options}" />
          </apex:selectList>
          </apex:outputPanel>
      </apex:actionRegion>
      <br/>
      <apex:outputPanel id="hidepanel3">
      <apex:outputText value="How?" style="display:{!if(picklist3=='true', 'block','none')}"/>
      <apex:inputField value="{!Case.Escalation_App_Functionality_Explain__c}" required="{!picklist3}" style="display:{!if(picklist3=='true', 'block; width:250px; height:75px;', 'none')}" />
      <!-- <apex:inputCheckbox value="{!Case.Escalation_Application_Functionality__c}" selected="true" style="display:none;" rendered="{!picklist3}"/> -->
      </apex:outputPanel>
      
      <br/> <br/>
      <h1>What business functionality are you unable to perform?</h1>
      <br/>
      <apex:inputField value="{! Case.Escalation_Business_Functionality__c }"  style="width: 300px; height: 100px" required="true"/>
      
      <br/> <br/> <br/>
      <apex:inputCheckbox value="{!Case.IsEscalated}" selected="true" style="display:none;"/>
      <apex:commandButton action="{!save}" value="Submit" />
      
    </apex:form>  
    </apex:pageBlock>   
</apex:page>

 
Hi everyone, so I'm having trouble making my extension class for my VF page be able to interact with custom fields that I need. When the picklists in my VF page get selected Yes/No it triggers a method in the extension class to check a checkbox Checked for Yes, Not Checked for No. But as of right now when I run my VF page and try to select Yes/No it gives me the error "Attempt to de-reference a null object. Error is in expression '{!setDataIntegrity}' in page escalation_question_page: Class.EscalationPageExtension.setDataIntegrity: line 31, column 1". So there is clearly something wrong when trying to check the checkbox.

Any help would be absolueltly fantastic and greatly appreciated. If you would also be able to give me an exmaple of how my Test Class for the extension would look I would really appreciate it. Im horrible with test classes and have no idea how it would look. Thanks again!

Extension:
/***************************************************************
 * Used for the Visualforce page Escalation Question Page
 * Created by Isaac Gomolka
 * 7/13/2017
 * ************************************************************/

public with sharing class EscalationPageExtension { 
    
    public String picklist1{get;set;}
    public String picklist2{get;set;}
    public String picklist3{get;set;}
    private Case cases;
   
    private ApexPages.StandardController ctrl;
    public EscalationPageExtension(ApexPages.StandardController controller)
    {
        ctrl = controller; 
        this.ctrl = ctrl;   
    }
    
    public List<SelectOption> options { get; private set; }
    {
    options = new List<SelectOption>();
    options.add(new SelectOption('', '-Select-')); // ==> option null
    options.add(new SelectOption('false', 'No'));
    options.add(new SelectOption('true', 'Yes'));
    }
    
    public void setDataIntegrity()
    {
        this.cases.Escalation_Data_Integrity__c = Boolean.valueof(picklist1); 
    }
    
    public void setViableWorkaround()
    {
        this.cases.Escalation_Viable_Workaround__c = Boolean.valueof(picklist2);
    }
    
    public void setAppFunction()
    {
        this.cases.Escalation_Application_Functionality__c = Boolean.valueof(picklist3);
    }
}

VF Page
<apex:page standardController="Case" extensions="EscalationPageExtension"><!-- We should keep sidebars and headers to give them a way out -->
    <apex:pageBlock title="{!$User.FirstName}, Answer Questions to Escalate Case.">
    
    <apex:form id="formID">
      
      <h1>How many users are affected?</h1>
      <apex:inputField value="{! Case.Escalation_Users_Affected__c }" required="true"/>
    
      <br/>
      <h1>Does this affect data integrity?</h1>
      <apex:actionRegion >
          <apex:outputPanel styleClass="requiredInput" layout="block">
          <apex:outputPanel styleClass="requiredBlock" layout="block"/>
          <apex:selectList value="{!picklist1}" size="1" required="true">
          <apex:actionSupport event="onchange" rerender="hidepanel1" action="{!setDataIntegrity}"/>
          <apex:selectOptions value="{!options}" />
          </apex:selectList>
          </apex:outputPanel>
      </apex:actionRegion>
      <br/>
      <apex:outputPanel id="hidepanel1">
      <apex:outputText value="How?" style="display:{!if(picklist1=='true', 'block', 'none')}"/>
      <apex:inputField value="{!Case.Escalation_Data_Integrity_Explain__c}" required="{!picklist1}" style="display:{!if(picklist1=='true', 'block; width:250px; height:75px;', 'none')}"/>
      <!-- <apex:inputCheckbox value="{!Case.Escalation_Data_Integrity__c}" selected="true" style="display:none;" rendered="{!picklist1}"/> -->
      </apex:outputPanel>
      
      <br/> <br/>
      <h1>Do you have a viable workaround?</h1>
      <apex:actionRegion >
          <apex:outputPanel styleClass="requiredInput" layout="block">
          <apex:outputPanel styleClass="requiredBlock" layout="block"/>
          <apex:selectList value="{!picklist2}" size="1" required="true">
          <apex:actionSupport event="onchange" rerender="hidepanel2" action="{!setViableWorkaround}"/>
          <apex:selectOptions value="{!options}" />
          </apex:selectList>
          </apex:outputPanel>
      </apex:actionRegion>
      <br/>
      <apex:outputPanel id="hidepanel2">
      <apex:outputText value="What is the viable workround?" style="display:{!if(picklist2=='true', 'block','none')}"/>
      <apex:inputField value="{!Case.Escalation_Viable_Workaround_Explain__c}" required="{!picklist2}" style="display:{!if(picklist2=='true', 'block; width:250px; height:75px;', 'none')}" />
      <!-- <apex:inputCheckbox value="{!Case.Escalation_Viable_Workaround__c}" selected="true" style="display:none;" rendered="{!picklist2}"/> -->
      </apex:outputPanel>
    
      <br/> <br/>
      <h1>Does this affect critical application functionality?</h1>
      <apex:actionRegion >
          <apex:outputPanel styleClass="requiredInput" layout="block">
          <apex:outputPanel styleClass="requiredBlock" layout="block"/>
          <apex:selectList value="{!picklist3}" size="1" required="true">
          <apex:actionSupport event="onchange" rerender="hidepanel3" action="{!setAppFunction}"/>
          <apex:selectOptions value="{!options}" />
          </apex:selectList>
          </apex:outputPanel>
      </apex:actionRegion>
      <br/>
      <apex:outputPanel id="hidepanel3">
      <apex:outputText value="How?" style="display:{!if(picklist3=='true', 'block','none')}"/>
      <apex:inputField value="{!Case.Escalation_App_Functionality_Explain__c}" required="{!picklist3}" style="display:{!if(picklist3=='true', 'block; width:250px; height:75px;', 'none')}" />
      <!-- <apex:inputCheckbox value="{!Case.Escalation_Application_Functionality__c}" selected="true" style="display:none;" rendered="{!picklist3}"/> -->
      </apex:outputPanel>
      
      <br/> <br/>
      <h1>What business functionality are you unable to perform?</h1>
      <br/>
      <apex:inputField value="{! Case.Escalation_Business_Functionality__c }"  style="width: 300px; height: 100px" required="true"/>
      
      <br/> <br/> <br/>
      <apex:inputCheckbox value="{!Case.IsEscalated}" selected="true" style="display:none;"/>
      <apex:commandButton action="{!save}" value="Submit" />
      
    </apex:form>  
    </apex:pageBlock>   
</apex:page>

Thanks again in advanced for the help!​
Ok so the backstory is:  I had to create a button that when pressed loads a visualforce page with questions on it. After the user answers the questions and clicks the submit button it escalates the case in which he is trying to escalate. I had to make dropbox menus (selectlists) with Yes/No as answers but had to store the answer in a field that is a checkbox.(yes being checked, no being unchecked). Im trying to now make a test class for the extension I needed to make in order for the selectlists to work, but im having trouble. 

I have been trying to make a test class for days and can't figure it out. I've done research and read up on it, but can't make one good enough.  I eventually was able to make one that runs an gets the code coverage, but my boss said "The test should not only provide coverage, but should really verify something. I’d recommend assertions validating that setting the picklist values sets the checkboxes." Ive been trying to make another one for about a week, so it's really frustrating me. PLEASE, can someone make a valid test class that would verify the visualforce page. I'd really appreciate it, I'm struggling.

My boss also explained it by saying "In the unit tests, you can actually code up instantiating a page and executing page button actions or controller methods. You could set the current page to the escalation page, set the values, and then execute the controller methods and see what values it gives you." Thanks again in advanced for the help.

Controller Extension:
public with sharing class EscalationPageExtension { 
    
    public String picklist1{get;set;}
    public String picklist2{get;set;}
    public String picklist3{get;set;}
   
    public EscalationPageExtension(ApexPages.StandardController controller){
        
    }
    
	public List<SelectOption> options { get; private set; }
    {
    options = new List<SelectOption>();
    options.add(new SelectOption('', '-Select-')); // ==> option disabled
    options.add(new SelectOption('false', 'No'));
    options.add(new SelectOption('true', 'Yes'));
    }
    
}

Test Class that doesnt verify enough.
@istest public class EscalationPageExtensionTest {

    public static testMethod void testEscalationPageExtension(){

        Apexpages.StandardController stdController = new Apexpages.StandardController(new Case());
        EscalationPageExtension controller = new EscalationPageExtension(stdController);
        
        controller.picklist1 = 'true';
        controller.picklist2 = 'true';
        controller.picklist3 = 'true';  
        
    }
}

Visualforce Page:
<apex:page standardController="Case" extensions="EscalationPageExtension">
    <apex:pageBlock title="{!$User.FirstName}, Answer Questions to Escalate Case.">
    
    <apex:form id="formID">
      
      <h1>How many users are affected?</h1>
      <apex:inputField value="{! Case.Escalation_Users_Affected__c }" required="true"/>
    
      <br/>
      <h1>Does this affect data integrity?</h1>
      <apex:actionRegion >
          <apex:outputPanel styleClass="requiredInput" layout="block">
          <apex:outputPanel styleClass="requiredBlock" layout="block"/>
          <apex:selectList value="{!picklist1}" size="1" required="true">
          <apex:actionSupport event="onchange" rerender="hidepanel1"/>
          <apex:selectOptions value="{!options}" />
          </apex:selectList>
          </apex:outputPanel>
      </apex:actionRegion>
      <br/>
      <apex:outputPanel id="hidepanel1">
      <apex:outputText value="How?" style="display:{!if(picklist1=='true', 'block', 'none')}"/>
      <apex:inputField value="{!Case.Escalation_Data_Integrity_Explain__c}" required="{!picklist1}" style="display:{!if(picklist1=='true', 'block; width:250px; height:75px;', 'none')}"/>
      <apex:inputCheckbox value="{!Case.Escalation_Data_Integrity__c}" selected="true" style="display:none;" rendered="{!picklist1}"/>
      </apex:outputPanel>
      
      <br/> <br/>
      <h1>Do you have a viable workaround?</h1>
      <apex:actionRegion >
          <apex:outputPanel styleClass="requiredInput" layout="block">
          <apex:outputPanel styleClass="requiredBlock" layout="block"/>
          <apex:selectList value="{!picklist2}" size="1" required="true">
          <apex:actionSupport event="onchange" rerender="hidepanel2"/>
          <apex:selectOptions value="{!options}" />
          </apex:selectList>
          </apex:outputPanel>
      </apex:actionRegion>
      <br/>
      <apex:outputPanel id="hidepanel2">
      <apex:outputText value="What is the viable workround?" style="display:{!if(picklist2=='true', 'block','none')}"/>
      <apex:inputField value="{!Case.Escalation_Viable_Workaround_Explain__c}" required="{!picklist2}" style="display:{!if(picklist2=='true', 'block; width:250px; height:75px;', 'none')}" />
      <apex:inputCheckbox value="{!Case.Escalation_Viable_Workaround__c}" selected="true" style="display:none;" rendered="{!picklist2}"/>
      </apex:outputPanel>
    
      <br/> <br/>
      <h1>Does this affect critical application functionality?</h1>
      <apex:actionRegion >
          <apex:outputPanel styleClass="requiredInput" layout="block">
          <apex:outputPanel styleClass="requiredBlock" layout="block"/>
          <apex:selectList value="{!picklist3}" size="1" required="true">
          <apex:actionSupport event="onchange" rerender="hidepanel3"/>
          <apex:selectOptions value="{!options}" />
          </apex:selectList>
          </apex:outputPanel>
      </apex:actionRegion>
      <br/>
      <apex:outputPanel id="hidepanel3">
      <apex:outputText value="How?" style="display:{!if(picklist3=='true', 'block','none')}"/>
      <apex:inputField value="{!Case.Escalation_App_Functionality_Explain__c}" required="{!picklist3}" style="display:{!if(picklist3=='true', 'block; width:250px; height:75px;', 'none')}" />
      <apex:inputCheckbox value="{!Case.Escalation_Application_Functionality__c}" selected="true" style="display:none;" rendered="{!picklist3}"/>
      </apex:outputPanel>
      
      <br/> <br/>
      <h1>What business functionality are you unable to perform?</h1>
      <br/>
      <apex:inputField value="{! Case.Escalation_Business_Functionality__c }"  style="width: 300px; height: 100px" required="true"/>
      
      <br/> <br/> <br/>
      <apex:inputCheckbox value="{!Case.IsEscalated}" selected="true" style="display:none;"/>
      <apex:commandButton action="{!save}" value="Submit" />
      
    </apex:form>  
    </apex:pageBlock>   
</apex:page>

Thanks!