का उपयोग कर एक फ़ील्ड निर्भर कैसे करें I फ़ील्ड को छिपाने योग्य बनाने के लिए Ctools निर्भरता का उपयोग कर रहा हूं। यह मेरे कोड का हिस्सा है:Drupal: CTools
$form['profile-status'] = array(
'#type' => 'radios',
'#title' => '',
'#options' => array(
'new' => t('Create a new profile.'),
'select' => t('Use an existing profile.'),
),
);
$form['select'] = array(
'#type' => 'select',
'#title' => t('Select a profile'),
'#options' => $options,
'#process' => array('ctools_dependent_process'),
'#dependency' => array('radio:profile-status' => array('select')),
);
$form['profile-properties'] = array(
'#type' => 'fieldset',
'#title' => t('View the profile'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array('radio:profile-status' => array('select')),
'#input' => true,
);
ऊपर स्निपेट में, दो तत्व, एक चयन और एक फ़ील्ड हैं। दोनों में # प्रोसेस और # निर्भरता पैरामीटर हैं और दोनों निर्भर मूल्य के लिए एक फ़ील्ड को इंगित करते हैं। समस्या यह है कि चयन या टेक्स्टफील्ड जैसे तत्व आसानी से छुपाए जा सकते हैं लेकिन यह फ़ील्डसेट के लिए काम नहीं करता है। this समर्थन अनुरोध पृष्ठ में, CTools निर्माता ने उल्लेख किया है कि '#input' => true
एक काम है। जैसा कि आप देखते हैं मैंने इसे कोड में जोड़ा है, लेकिन यह भी काम नहीं करता है।
क्या आपके पास कोई सुझाव है?