Drupal API

form.inc

  • Drupal 5
  • Drupal 6
  • Документация
  • Исходный код

Версия 1.265.2.25 (checked in on 2009/05/26 at 08:18:46 by goba)

Функции

ИмяОписание
batch_getПолучает текущий пакет операций.
batch_processProcess the batch.
batch_setСоздать новый пакет (список) операций.
date_validateПроверка корректности ввода данных типа date. Запрет ввода дат типа 31 Февраля, 2006.
drupal_executeИзвлекает форму по form_id, заполняет ее значениями из $form_state['values'], обрабатывает, и возвращает ошибки обработки этой формы. Эта функция — аналог drupal_get_form(), используемый для программной работы с формами.
drupal_get_formПолучает форму из функции-конструктора или извлекает её из кеша, если форма была сформирована на предыдущей загрузке страницы. Далее функция проводит проверку и обработку данных, и, если необходимо формирует её HTML-код.
drupal_prepare_formПодготавливает полный массив формы, добавляя в него недостающие значения по-умолчанию, вызывая нужные хуки, а также, опционально, выставляя токены валидации для некоторых полей, чтобы обезопасить форму от несанкционированных вмешательств.
drupal_process_formЭта функция является основной в Forms API. Предназначена для построения формы и проверки формы на соответствие требованиям и обработки результатов.
drupal_rebuild_formRetrieves a form, caches it and processes it with an empty $_POST.
drupal_redirect_formПеренаправляет пользователя на URL после обработки формы.
drupal_render_formГенерирует темизированный HTML-код из структурированного массива формы.
drupal_retrieve_formВозвращает структурированный массив, определяющий данную форму.
drupal_validate_formПроверяет отправленные пользователем данные формы из $form_state, используя функции проверки, заданные в структурированном массиве формы.
expand_checkboxes
expand_dateRoll out a single date element.
expand_password_confirmExpand a password_confirm field into two text boxes.
expand_radiosПревращает элемент radios («список переключателей») в список еденичных элементов radio («переключатель»).
form_builderWalk through the structured form array, adding any required properties to each element and mapping the incoming $_POST data to the proper elements.
form_clean_idPrepare an HTML ID attribute string for a form item.
form_errorУстанавливает флаг наличия ошибки для $element.
form_execute_handlersA helper function used to execute custom validation and submission handlers for a given form. Button-specific handlers are checked first. If none exist, the function falls back to form-level handlers.
form_expand_ahahAdd AHAH information about a form element to the page to communicate with javascript. If #ahah[path] is set on an element, this additional javascript is added to the page header to attach the AHAH behaviors. See ahah.js for more information.
form_get_cacheПолучает форму из кэша.
form_get_errorReturn the error message filed against the form with the specified name.
form_get_errorsВозвращает ассоциативный массив всех ошибок на форме.
form_get_optionsTraverses a select element's #option array looking for any values that hold the given key. Returns an array of indexes that match.
form_options_flatten
form_select_options
form_set_cacheСохраняет форму в кэше.
form_set_errorУстанавливает ошибку для указанного элемента формы.
form_set_valueИзменяет отправленные значения формы во время цикла обработки формы.
form_type_checkboxes_valueHelper function to determine the value for a checkboxes form element.
form_type_checkbox_valueHelper function to determine the value for a checkbox form element.
form_type_image_button_valueHelper function to determine the value for an image button form element.
form_type_password_confirm_valueHelper function to determine the value for a password_confirm form element.
form_type_select_valueHelper function to determine the value for a select form element.
form_type_textfield_valueHelper function to determine the value for a textfield form element.
form_type_token_valueHelper function to determine the value for form's token value.
map_monthВспомогательная функция используемая с drupal_map_assoc для показа названий месяцев.
password_confirm_validateValidate password_confirm element.
process_weightExpand weight elements into selects.
theme_buttonФорматирует кнопку для формы.
theme_checkboxТемизирует чекбокс.
theme_checkboxesИзменяет стиль сразу нескольких чекбоксов.
theme_dateФорматирует дату выбранного элемента.
theme_fieldsetФорматирует группу элементов формы
theme_fileФорматирует поле загрузки файла.
theme_formТемизирует форму.
theme_form_elementВозвращает темизированный элемент формы.
theme_hiddenФорматирует скрытое поле формы.
theme_image_buttonТемизирует кнопку-картинку формы.
theme_itemВозвращает темизированный элемент формы.
theme_markup
theme_passwordФорматирует поле ввода пароля.
theme_password_confirmФорматирует пункт подтверждения пароля.
theme_radioФорматирует одиночный переключатель (радио-кнопку) для их группы.
theme_radiosФорматирует сразу несколько радио-кнопок.
theme_selectFormat a dropdown menu or scrolling selection box.
theme_submitФорматирует кнопку отправки формы.
theme_textareaФорматирует многострочное текстовое поле ввода для формы.
theme_textfieldФорматирует однострочное текстовое поле ввода.
theme_tokenТемизирует токен формы.
weight_valueIf no default value is set for weight select boxes, use 0.
_element_infoRetrieve the default properties for the defined element type.
_form_builder_handle_input_elementPopulate the #value and #name properties of input elements so they can be processed and rendered. Also, execute any #process handlers attached to a specific element.
_form_builder_ie_cleanupIn IE, if only one submit button is present, AND the enter key is used to submit the form, no form value is sent for it and our normal button detection code will never detect a match. We call this function after all other button-detection is complete...
_form_button_was_clickedHelper function to handle the sometimes-convoluted logic of button click detection.
_form_set_classУстанавливает значение атрибута class для элемента формы.
_form_set_valueHelper function for form_set_value().
_form_validatePerforms validation on form elements. First ensures required fields are completed, #maxlength is not exceeded, and selected options were in the list of options given to the user. Then calls user-defined validators.
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему

Что такое OpenID?
  • Регистрация
  • Забыли пароль?

Документация

  • Drupal 6
  • Константы
  • Файлы
  • Функции
  • Глобальные переменные
  • Разделы