function arrange_fields_settings_form in Arrange Fields 7
Same name and namespace in other branches
- 6 arrange_fields.module \arrange_fields_settings_form()
This function returns a form which we will use to configure the arrange_fields module. It is called from menu item: admin/settings/arrange-fields/settings
Return value
array
1 string reference to 'arrange_fields_settings_form'
- arrange_fields_menu in ./
arrange_fields.module - Implementation of hook_menu()
File
- ./
arrange_fields.module, line 159
Code
function arrange_fields_settings_form() {
$form = array();
$form["arrange_fields_grid_width"] = array(
"#type" => "select",
"#title" => t("Grid width"),
"#options" => array(
1 => "1px",
5 => "5px",
10 => "10px (default)",
15 => "15px",
20 => "20px",
),
"#default_value" => variable_get("arrange_fields_grid_width", 10),
"#description" => t("This setting determines the spacing between elements on the grid (when arranging fields).\n For more free-form movement, set to 1px. More rigid, boxy movement, set to 20px.\n If you are unsure what to set, leave this at 10px."),
);
$form["arrange_fields_snap_resize"] = array(
"#type" => "checkbox",
"#title" => t("Experimental - Snap to grid when resizing text boxes and markup?"),
"#default_value" => variable_get("arrange_fields_snap_resize", 0),
"#description" => t("When resizing textfields, textareas, or markup, should\n we automatically snap to the nearest grid width? This may help\n elements line up more cleanly."),
);
$form["arrange_fields_other_form_ids"] = array(
"#type" => "textarea",
"#title" => t("Additional form_id's"),
"#default_value" => variable_get("arrange_fields_other_form_ids", ""),
"#description" => t("Enter any additional form_id's you would like to be\n able to arrange, <strong>one per line</strong>. \n Be aware that\n this module (Arrange Fields) may not be able to\n arrange forms with complex structures. Also, form_ids that\n are longer than 100 characters are allowed, but may not work \n correctly if the first 100 characters are identical between two\n or more ids.\n <br>\n After you enter complete form_id's here and hit Save,\n you will be able to arrange them by clicking on them\n at the bottom of the ") . l(t("Arrange Fields admin settings page"), "admin/settings/arrange-fields") . ".\n <br>\n " . t("Example") . ": <br> \n <strong>my_custom_form_id_1</strong>\n <br>\n " . t("(Advanced) Include File: ") . "<br>" . t("\n You may also specify one required include file after the form_id\n in the format <em>form_id:module,include.file.inc</em>") . "<br>\n " . t("Example:") . "<br>\n <strong>contact_site_form:contact, contact.pages.inc</strong>\n ",
);
$form["arrange_fields_enable_form_id_discovery"] = array(
"#type" => "checkbox",
"#title" => t("Enable form_id and include file discovery mode"),
"#default_value" => variable_get("arrange_fields_enable_form_id_discovery", 0),
"#description" => t("If enabled, users with the 'Administer Arrange Fields settings' permission\n will see the ID of any form on the page printed out, as well as\n any possible include files which might be required. This can\n be very helpful in dicovering form_id's, for use with the \n Additional form_id's box above."),
);
return system_settings_form($form);
}