function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AmandaSilberAmandaSilber 

HELP VF 'Questionnaire' using <List>

I am creating a questionnaire that asks the same question "Do you support {!partner name}?" and would like to have a picklist field next to it with options yes/no.  The partner name comes from the possible multiple records (max 10) related to the parent record.

 

Parent Record = Employee Onboarding

Child Records = Locations

Questionnaire Record (Also Child to Employee Onboarding) = Partnership Validation

 

I got all of the related {!partner name} questions on the page, via DataTable, but now I cannot have an individual yes/no for each question (without all yes/no's being the same field). 

 

I need to figure out how to get this into a question/answer format with one question and one yes/no per line. HELP???

 

 


VF Page:

 

 <!--**********Partners Validation Page**********-->
          
               <apex:pageblocksection title="Partners Validation" rendered="{!Partnership_Validation__c.Space_Type__c == 'SRA'}" id="pagesection4">
                 <apex:datatable value="{!locspas}" var="ls" columns="1" width="100%" cellspacing="5px">
                        <apex:column >               
                        <apex:pageblocksectionitem ><apex:outputlabel style="font-weight:bold" value="Do You Still Support"/><apex:outputtext value=" {!ls.Partnership_Account_Name__c}?" style="font-weight:bold"/></apex:pageblocksectionitem>  
                        </apex:column>
                 </apex:datatable>
                                      
                       <apex:pageblocksectionitem ><apex:inputfield value="{!Partnership_Validation__c.Yes_No_partner__c}"/></apex:pageblocksectionitem>
                       <apex:pageblocksectionitem ><apex:inputfield value="{!Partnership_Validation__c.address_Yes_No__c}"/></apex:pageblocksectionitem>
                       

 

Custom Controller:

public class pvalidationwizard {

String recordId;
Partnership_Validation__c pval;
List<Locations_Spaces__c> locspas;

public List<Locations_Spaces__c> getlocspas() {
        locspas = [select Partnership_Account_Name__c from Locations_Spaces__c
                 where Employee__c = :ApexPages.currentPage().getParameters().get('Employee__c')];         
        return locspas;
}


}

 

 

any help or direction would be greatly appreciated!!