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
Tony Williams 9Tony Williams 9 

VF Page Component Error: The dependent picklist 'Card Type' requires its controlling field 'Payment Method' to be present on the page.

I have enabled Payment Method picklist  in my org . The dependent picklisst is called  CardType. I am using thee two inputfields within a form inside of a VF Page Component called ForAddressVerfication. The component is embedded in the Visual Force Page called  OrderEntry4. When this page loads it tries to pull in the compoennt and  I get this error: "The dependent picklist 'Card Type' requires its controlling field 'Payment Method' to be present on the page." 
 
===========VF Page Component: ForAddressVerification  =================
<!-- <apex:form >  --> 
       <div id="SelectAddressDetail" style="display:none;">    <!-- Removing this will give us SmartyStreets Verify -->
             <apex:form >
              
              <div id="AddCreditCardInput" class="credit-card-input"  style="display:none;">
                <h1>Enter and Save</h1><br/> 
                <h1>Credit Card Information</h1><br/><br/>
                <div class="two-pixel-padding">
                    <label class="top-label">&nbsp;Name on Credit Card</label><span class="required">*</span><br />
                    <input type="text" id="AddCreditCardName" maxlength='30' />
                </div>
                <div class="two-pixel-padding">
                    <label class="top-label">&nbsp;Credit Card Type</label><span class="required">*</span><br />
                    <apex:inputfield value="{!Order.Chargent_Order__r.ChargentOrders__Card_Type__c}" id="AddCreditCardType" />

                </div>
                <div class="two-pixel-padding">
                    <label class="top-label">&nbsp;Credit Payment Method</label><span class="required">*</span><br />
                    <apex:inputfield value="{!Order.Chargent_Order__r.ChargentOrders__Payment_Method__c}" id="AddPaymentMethod" />
                </div>
                <div class="two-pixel-padding">
                    <label class="top-label">&nbsp;Card Number (16 digits)</label><span class="required">*</span><br />
                    <input type="text" id="AddCreditCardNumber" maxlength="16" />
                </div>
                <div class="two-pixel-padding">
                    <label class="top-label">&nbsp;Card Month (MM)</label><span class="required">*</span><br />
                    <input type="text" id="AddCreditCardMonth" maxlength="2" />
                </div>
                <div class="two-pixel-padding">
                    <label class="top-label">&nbsp;Card Year (YYYY)</label><span class="required">*</span><br />
                    <input type="text" id="AddCreditCardYear" maxlength="4" />
                </div>
                <div class="two-pixel-padding">
                    <label class="top-label">&nbsp;Card Security (XXX)</label><br />
                    <input type="text" id="AddCreditCardSecurity" maxlength="4" />
                </div>
            </div>    
             <div id="AddressInput" class="address-input" style="display:block;">
                <h1>Enter or Select Address Information</h1><br/><br/>
                <div><input type="hidden" id="SelectAddressType" /></div>
                <div id="SelectAddressLoading" style="text-align:center;"></div>
                <div id="SelectAddressList" >
                    <table id="SelectAddressListTable" cellpadding="3px" class="select-address-table" />
                </div>  
                 <div id="AddAddressInput" style="display:block;">
                    <div class="input-container-left">
                        <div class="two-pixel-padding">
                            <label class="top-label">&nbsp;First Name</label><br />
                            <input type="text" id="AddAddressFirstName" />
                        </div>
                        <div class="two-pixel-padding">
                            <label class="top-label">&nbsp;Last Name</label><span class="required">*</span><br />
                            <input type="text" id="AddAddressLastName" />
                        </div>
                    </div><br/>
                    <div class="input-container-left">
                        <div class="two-pixel-padding">
                            <label class="top-label">&nbsp;Address Line One</label><span class="required">*</span><br />
                            <input type="text" id="AddAddressLineOne" />
                        </div>
                        <div class="two-pixel-padding">
                            <label class="top-label">&nbsp;Address Line Two</label><br />
                            <input type="text" id="AddAddressLineTwo" />
                        </div>
                    </div><br/>
                    <div class="input-container-left">
                        <div class="two-pixel-padding">
                            <label class="top-label">&nbsp;City</label><br />
                            <input type="text" id="AddAddressCity" />
                        </div>
                        <div class="two-pixel-padding">
                            <label class="top-label">&nbsp;State</label><br />
                            <input type="text" id="AddAddressState" maxlength="2" size="2" />
                        </div>
                        <div class="two-pixel-padding">
                            <label class="top-label">&nbsp;Zip Code</label><span class="required">*</span><br />
                            <input type="text" id="AddAddressZipCode" maxlength="10" size="10" />
                        </div>
						<div class="two-pixel-padding">
                             <label class="top-label">&nbsp;</label><br />
                            <input type="button" id="VerifyAddress" value="Verify" style="cursor:pointer;width:50px;height:30px;" onclick="showSaveButton();"/>
                        </div>
                    </div><br/>
                    <div class="input-container-left">
                        <div class="two-pixel-padding">
                            <label class="top-label">&nbsp;County</label><br />
                            <input type="text" id="AddAddressCounty" />
                        </div>
                        
                        <div class="two-pixel-padding">
                            <label class="top-label">&nbsp;Country</label><br />    
                            <select id="AddAddressCountry" style="width:200px;">
                                <option selected="selected">UNITED STATES</option>
                                
                            </select>
                        </div>
                        <div><input type="hidden" id="AddAddressId"/></div>
                    </div><br/>
                     
                </div>
             </div> 
                 
        </apex:form> 

============== Order Entry Page Segment =======================
 <apex:pageBlockSectionItem > 
               <apex:outputLabel value="Shipping Address: " for="OrderShippingAddress" id="OrderShippingAddressLabel" />  
                  
               
                            
                       <div id="OrderShippingAddressDetail" style="display:none;">
                        <span id="OrderShippingAddressFirstName"></span>&nbsp;
                        <span id="OrderShippingAddressLastName"></span><br/>
                         
                        <span id="OrderShippingAddressLineOne"></span><br/>
                             
                        <span id="OrderShippingAddressLineTwo"></span><br/>
                              
                        <span id="OrderShippingAddressCity"></span>&nbsp;
                        <span id="OrderShippingAddressState"></span>&nbsp;
                        <span id="OrderShippingAddressZip"></span><br/>
                        <span id="OrderShippingAddressCounty"></span><br/>
                        <span id="OrderShippingAddressCountry"></span><br/>
                             
                    </div> 
                           
                    <input type="button" style="cursor:pointer;" id="OrderShippingAddressChangeLink" 
                        onclick="openSelectAddressDialog('Shipping');" value="Change Shipping Address" />
           </apex:pageBlockSectionItem>
           
        <c:ForSSAddressVerification Order="{!Order}"/>                  
        </apex:pageBlockSection>



 
Tony Williams 9Tony Williams 9
Here is what  the controlling field looks like:Payment Method Pick list with subordinate pick list Card Type