Last active
August 29, 2015 14:18
-
-
Save VladSavitsky/89e5aad80080c44a3325 to your computer and use it in GitHub Desktop.
Drupal Form API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$form['image'] = array( | |
'#type' => 'media', | |
'#tree' => TRUE, | |
'#title' => t('Image'), | |
'#description' => t('Allowed formats: png, jpg, jpeg, gif.'), | |
'#media_options' => array( | |
'global' => array( | |
'file_extensions' => 'png jpg jpeg gif', | |
'max_filesize' => '20 MB', | |
'file_directory' => '', | |
'types' => array('image'), | |
), | |
), | |
'#default_value' => $conf['image'], | |
'#required' => FALSE, | |
); | |
ctools_form_include($form_state, 'content'); | |
ctools_form_include($form_state, 'gc_locations', 'gc_panes', 'plugins/content_types/gc_locations'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.drupal.org/node/2288487