function _acquia_lift_admin_build_identity_form in Acquia Lift Connector 7.3
Admin form for configuring acquia_lift behavior.
1 call to _acquia_lift_admin_build_identity_form()
- acquia_lift_admin_form in ./
acquia_lift.admin.inc - @file acquia_lift.admin.inc Provides functions needed for the admin UI.
File
- ./
acquia_lift.admin.inc, line 165 - acquia_lift.admin.inc Provides functions needed for the admin UI.
Code
function _acquia_lift_admin_build_identity_form(&$form, &$form_state) {
$identity_parameter_display_value = variable_get('acquia_lift_identity_param', 'identity');
$identity_type_parameter_display_value = variable_get('acquia_lift_identity_type_param') ?: 'identityType';
$default_identity_type_display_value = variable_get('acquia_lift_default_identity_type') ?: ACQUIA_LIFT_DEFAULT_IDENTITY_TYPE_IDENTIFIER;
$default_identity_type_default_value = variable_get('acquia_lift_default_identity_type') ?: ACQUIA_LIFT_DEFAULT_IDENTITY_TYPE_DEFAULT;
$form['acquia_lift_identity_param'] = array(
'#type' => 'textfield',
'#title' => t('Identity Parameter'),
'#description' => t('The URL link parameter for specific visitor information, such as an email address or social media username, which is sent to the Lift Profile Manager. Example using <strong>@identity_parameter_display_value</strong>: ?<strong><ins>@identity_parameter_display_value</ins></strong>=jdoe01', [
'@identity_parameter_display_value' => $identity_parameter_display_value,
]),
'#default_value' => variable_get('acquia_lift_identity_param'),
);
$form['acquia_lift_identity_type_param'] = array(
'#type' => 'textfield',
'#title' => t('Identity Type Parameter'),
'#description' => t('The URL link parameter that corresponds to a Lift Profile Manager identifier type (one of the pre-defined ones or a new one you\'ve created). Example using <strong>@identity_type_parameter_display_value</strong>: ?@identity_parameter_display_value=jdoe01&<strong><ins>@identity_type_parameter_display_value</ins></strong>=@default_identity_type_default_value', [
'@identity_parameter_display_value' => $identity_parameter_display_value,
'@identity_type_parameter_display_value' => $identity_type_parameter_display_value,
'@default_identity_type_default_value' => $default_identity_type_default_value,
]),
'#default_value' => variable_get('acquia_lift_identity_type_param'),
'#states' => array(
'visible' => array(
':input[name="acquia_lift_identity_param"]' => [
'!value' => '',
],
),
),
);
$form['acquia_lift_default_identity_type'] = array(
'#type' => 'textfield',
'#title' => t('Default Identity Type'),
'#description' => t('The Lift Profile Manager identity type to be used by default. Example using <strong>@default_identity_type_display_value</strong>: a visitor may visit the site through ?@identity_parameter_display_value=jdoe01 and omit the "@identity_type_parameter_display_value" query, and Lift will automatically identify this visitor as "jdoe01" of <strong><ins>@default_identity_type_display_value</ins></strong> type. Leave this field blank to default to <strong>@default</strong> identity type."', [
'@default' => 'email',
'@identity_parameter_display_value' => $identity_parameter_display_value,
'@identity_type_parameter_display_value' => $identity_type_parameter_display_value,
'@default_identity_type_display_value' => $default_identity_type_display_value,
]),
'#default_value' => variable_get('acquia_lift_default_identity_type'),
'#states' => array(
'visible' => array(
':input[name="acquia_lift_identity_param"]' => [
'!value' => '',
],
),
),
'#attributes' => array(
'placeholder' => ACQUIA_LIFT_DEFAULT_IDENTITY_TYPE_DEFAULT,
),
);
}