function sliderfield_example_simplest_callback in SliderField 7.2
Callback for ajax_example_simplest.
On an ajax submit, the form builder function is called again, then the $form and $form_state are passed to this callback function so it can select which portion of the form to send on to the client.
Return value
renderable array (the textfield element)
1 string reference to 'sliderfield_example_simplest_callback'
- sliderfield_example_custom_form in sliderfield_example/
sliderfield_example.module - A custom form
File
- sliderfield_example/
sliderfield_example.module, line 723 - Module's main file.
Code
function sliderfield_example_simplest_callback($form, $form_state) {
// The form has already been submitted and updated. We can return the replaced
// item as it is.
return '<div id="replace_textfield_div">' . t("Say why you chose '@value'", array(
'@value' => $form_state['values']['trigger']['value'],
)) . '</div>';
}