You are here

function form_builder_get_saveable_properties in Form Builder 6

Get a list of properties that are supported in any way by an element.

This returns a list of all supported properties within an element, even if some of those properties do not have an interface for editing or are only used internally by the module providing the form type this element is being saved in.

Parameters

$form_type: The type of form being edited (profile, node, webform, etc.)

$element: A standard FAPI element whose properties are being checked.

Return value

A non-indexed list of properties that may be saved for this element.

1 call to form_builder_get_saveable_properties()
form_builder_field_configure_submit in includes/form_builder.admin.inc

File

includes/form_builder.api.inc, line 128
form_builder.api.inc Universally used API functions within the Form builder module.

Code

function form_builder_get_saveable_properties($form_type, $element) {

  // Get the list of supported properties on each element.
  $form_type = form_builder_get_form_type($form_type);
  $saveable = array();
  if (isset($form_type[$element['#form_builder']['element_type']]['properties'])) {
    $saveable = $form_type[$element['#form_builder']['element_type']]['properties'];
  }
  return $saveable;
}