code/models/PostcardMetadataField.php
/**
     * If the field type is a dropdown and a vocabularly url has been specified
     * then after save call a function to populate the dropdown items from the vocab.
     */
If the field type is a dropdown and a vocabularly url has been specified
then after save call a function to populate the dropdown items from the vocab.
If the field type is a dropdown and a vocabularly url has been specified then after save call a function to populate the dropdown items from the vocab .
protected function onAfterWrite()
    {
        parent::onAfterWrite();
        if ($this->FieldType == 'DROPDOWN' && $this->DropdownVocabularyUrl && !$this->PreventDropdownItemUpdate)
        {
            $errorMessage = $this->populateDropdownFromVocab();
            if ($errorMessage) {
                $this->setLastVocabMessage('BAD', $errorMessage);
            } else {
                $this->setLastVocabMessage('GOOD', 'Items successfully loaded from the vocabulary server.');
            }
        }
    }
protected function onAfterWrite ( ) { parent :: onAfterWrite ( ) ; if ( $ this -> FieldType == 'DROPDOWN' && $ this -> DropdownVocabularyUrl && ! $ this -> PreventDropdownItemUpdate ) { $ errorMessage = $ this -> populateDropdownFromVocab ( ) ; if ( $ errorMessage ) { $ this -> setLastVocabMessage ( 'BAD' , $ errorMessage ) ; } else { $ this -> setLastVocabMessage ( 'GOOD' , 'Items successfully loaded from the vocabulary server.' ) ; } } }
If the field type is a dropdown and a vocabularly url has been specified
 then after save call a function to populate the dropdown items from the vocab.
If the field type is a dropdown and a vocabularly url has been specified then after save call a function to populate the dropdown items from the vocab .
// Call parent function. // If the type of this field is dropdown and a vocabularly url has been specified, provided the user // has not chosen to prevent update, then update/populate the dropdown items from the vocab server. // If there was an error mesaaqge then set a bad message, if not then all must have been ok and set a good one.