You are here

function flickrfield_form_process_flickrfield_flickrid in Flickr 7

Form process callback for flickr photoset fields.

1 string reference to 'flickrfield_form_process_flickrfield_flickrid'
flickrfield_element_info in field/flickrfield.module
Implements hook_element_info().

File

field/flickrfield.module, line 138
Defines a Flickr field type.

Code

function flickrfield_form_process_flickrfield_flickrid($element, $form_state, $form) {
  $element['flickrid'] = array(
    '#type' => 'textfield',
    '#title' => t('Flickr set ID'),
    '#maxlength' => 64,
    '#description' => t("An example: In the Flickr URL <em>https://www.flickr.com/photos/98518260@N02/sets/72157634563269642</em> the Flickr set ID is the last part, <em>72157634563269642</em>."),
    '#required' => FALSE || $element['#required'],
    '#default_value' => !empty($element['#value']['flickrid']) ? $element['#value']['flickrid'] : '',
    '#size' => 20,
    '#maxlength' => 20,
    '#attributes' => array(
      'class' => array(
        'flickrfield_flickrid',
      ),
    ),
  );
  return $element;
}