i'mI'm trying to create custom drupalDrupal 7 module , in. In the form setting offor the module iI have checkboxes wichwhere the admin can select multiple content typetypes:
After installing the module iI need to automatically create towtwo fields (Price of type decimal (4,2), and currency of type text) only in just to the selected 'content types' the admin has selected from the list above.
andAnd this is how iI set the content type to the checkboxes list in the 'mymodule_payment_admin_settings_form'mymodule_payment_admin_settings_form
hook in 'mymodule.module' mymodule.module
:
$form['test_content_types'] = array(
'#type' => 'checkboxes',
'#options' => drupal_map_assoc(node_type_get_names()),
'#default_value' => variable_get('test_content_types'),
'#required' => TRUE
);