function arrange_fields_display_otherform in Arrange Fields 6
Same name and namespace in other branches
- 7 arrange_fields.module \arrange_fields_display_otherform()
Similar function as arrange_fields_display_form, but this is specifically for other, more generic forms on the system. For example, user_register, or custom forms which a developer has written.
1 string reference to 'arrange_fields_display_otherform'
- arrange_fields_menu in ./
arrange_fields.module - Implementation of hook_menu().
File
- ./
arrange_fields.module, line 1251
Code
function arrange_fields_display_otherform($form_id) {
$form_type = "otherform";
drupal_set_title("Arrange fields - Other Forms - {$form_id}");
$rtn = "";
$position_data = variable_get("arrange_fields_position_data_{$form_id}", FALSE);
if ($position_data) {
// Meaning, we have position data already for this form, so it is NOT
// a brand-new form. So, we should not pass "true" to the javascript
// function arrangeFieldsRepositionToGrid. Let's add a drupal
// setting so we know that is the case.
drupal_add_js(array(
"arrangeFieldsNotNewForm" => TRUE,
), "setting");
}
arrange_fields_add_arrange_css_js();
// We want to get the form which will let us save the position
// information.
$rtn .= drupal_get_form("arrange_fields_position_form", $form_id, $form_type);
$rtn .= "<div>" . t("Use this form to drag-and-drop fields into the order which\n you want them to appear on the form entry page.") . "</div>\n <div>" . t("You may resize text fields by dragging the right side\n of the field.") . "</div>";
$rtn .= "<input type='button' value='add markup' onClick='arrangeFieldsDialogEditMarkup(\"new\");'>";
// The form we will be rearranging...
$GLOBALS["arrange_fields_editing"] = $form_id;
$GLOBALS["arrange_fields_editing_type"] = $form_type;
$rtn .= drupal_get_form($form_id);
$rtn .= "<div>" . t("If you need more room, move a field close to the bottom, then save positions. The\n container will resize, adding more room.") . "</div>";
$rtn .= arrange_fields_render_dialogs();
return $rtn;
}