function arrange_fields_position_form in Arrange Fields 6
Same name and namespace in other branches
- 7 arrange_fields.module \arrange_fields_position_form()
This is the form which we will use to store the position data for the fields.
Parameters
array $form_state:
string $form_id:
string $form_type:
Return value
array
3 string references to 'arrange_fields_position_form'
- arrange_fields_display_form in ./
arrange_fields.module - This function displays the arrangement form, where the user will be able to actually drag and drop to arrange fields. In it, we actually load the form which they are arranging, but we will be saving our data to our own form.
- arrange_fields_display_otherform in ./
arrange_fields.module - 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.
- arrange_fields_display_webform in ./
arrange_fields.module - Similar function as arrange_fields_display_form, but this is specifically for webforms (with the webform module).
File
- ./
arrange_fields.module, line 1303
Code
function arrange_fields_position_form($form_state, $form_id, $form_type) {
$form = array();
$form["arrange_fields_form_id"] = array(
"#type" => "hidden",
"#value" => $form_id,
);
$form["arrange_fields_form_type"] = array(
"#type" => "hidden",
"#value" => $form_type,
);
// This field ends up being hidden in CSS. It
// is where we will store a semi-serialized string of all our
// position data for all our fields.
$form["arrange_fields_position_data"] = array(
"#type" => "textfield",
"#maxlength" => 999999999999,
);
$form["save"] = array(
"#type" => "submit",
"#value" => "Save position data",
"#attributes" => array(
"onClick" => "return arrangeFieldsSavePositions()",
),
);
$form["reset"] = array(
"#type" => "button",
"#value" => "Reset position data",
"#attributes" => array(
"onClick" => "return arrangeFieldsConfirmReset()",
),
);
return $form;
}