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_process | Process 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_form | Retrieves 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_date | Roll out a single date element. |
expand_password_confirm | Expand a password_confirm field into two text boxes. |
expand_radios | Превращает элемент radios («список переключателей») в список еденичных элементов radio («переключатель»). |
form_builder | Walk through the structured form array, adding any required properties to each element and mapping the incoming $_POST data to the proper elements. |
form_clean_id | Prepare an HTML ID attribute string for a form item. |
form_error | Устанавливает флаг наличия ошибки для $element. |
form_execute_handlers | A 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_ahah | Add 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_error | Return the error message filed against the form with the specified name. |
form_get_errors | Возвращает ассоциативный массив всех ошибок на форме. |
form_get_options | Traverses 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_value | Helper function to determine the value for a checkboxes form element. |
form_type_checkbox_value | Helper function to determine the value for a checkbox form element. |
form_type_image_button_value | Helper function to determine the value for an image button form element. |
form_type_password_confirm_value | Helper function to determine the value for a password_confirm form element. |
form_type_select_value | Helper function to determine the value for a select form element. |
form_type_textfield_value | Helper function to determine the value for a textfield form element. |
form_type_token_value | Helper function to determine the value for form's token value. |
map_month | Вспомогательная функция используемая с drupal_map_assoc для показа названий месяцев. |
password_confirm_validate | Validate password_confirm element. |
process_weight | Expand 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_select | Format a dropdown menu or scrolling selection box. |
theme_submit | Форматирует кнопку отправки формы. |
theme_textarea | Форматирует многострочное текстовое поле ввода для формы. |
theme_textfield | Форматирует однострочное текстовое поле ввода. |
theme_token | Темизирует токен формы. |
weight_value | If no default value is set for weight select boxes, use 0. |
_element_info | Retrieve the default properties for the defined element type. |
_form_builder_handle_input_element | Populate 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_cleanup | In 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_clicked | Helper function to handle the sometimes-convoluted logic of button click detection. |
_form_set_class | Устанавливает значение атрибута class для элемента формы. |
_form_set_value | Helper function for form_set_value(). |
_form_validate | Performs 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. |