function arrange_fields_pre_render in Arrange Fields 7
This function is called before the elements are displayed on screen. The main thing we wish to do here is move the contents of #af_prefix and #af_suffix into the real #prefix and #suffix fields.
Parameters
unknown_type $element:
Return value
unknown
1 string reference to 'arrange_fields_pre_render'
- arrange_fields_add_draggable_wrappers in ./
arrange_fields.module - In this function, we are going to add div's around elements we wish to make draggable on the page. The jQuery can then grab onto those divs to make them draggable.
File
- ./
arrange_fields.module, line 1100
Code
function arrange_fields_pre_render($element) {
if (!isset($element["#prefix"])) {
$element["#prefix"] = "";
}
if (!isset($element["#suffix"])) {
$element["#suffix"] = "";
}
// If the type is a managed_file, let's take away the upload button, as it can cause
// weird problems with Arrange Fields after uploading. This is due to some kind of
// conflict with the CSS, but I have not be able to figure that out yet.
if (af_get($element["#type"]) == "managed_file") {
if (isset($element["upload_button"])) {
// unset($element["upload_button"]);
$element["upload_button"]["#executes_submit_callback"] = FALSE;
}
}
if (isset($element["#af_prefix"])) {
$element["#prefix"] .= $element["#af_prefix"];
$element["#suffix"] .= $element["#af_suffix"];
}
return $element;
}