Documentation

CRM_Contact_Form_Edit_Address
in package

This class is used to build address block.

Table of Contents

Methods

buildQuickForm()  : mixed
Build form for address input fields.
formRule()  : array<string|int, mixed>|bool
Check for correct state / country mapping.
setDefaultValues()  : mixed
Set default values for address block.
addCustomDataToForm()  : mixed
Add custom data to the form.
enforceRequired()  : bool
Should required fields be enforced.

Methods

buildQuickForm()

Build form for address input fields.

public static buildQuickForm(CRM_Core_Form &$form[, int $addressBlockCount = NULL ][, bool $sharing = TRUE ][, bool $inlineEdit = FALSE ]) : mixed
Parameters
$form : CRM_Core_Form
$addressBlockCount : int = NULL

The index of the address array (if multiple addresses on a page).

$sharing : bool = TRUE

False, if we want to skip the address sharing features.

$inlineEdit : bool = FALSE

True when edit used in inline edit.

Tags
throws
CRM_Core_Exception

formRule()

Check for correct state / country mapping.

public static formRule(array<string|int, mixed> $fields[, array<string|int, mixed> $files = [] ][, CRM_Core_Form $self = NULL ]) : array<string|int, mixed>|bool
Parameters
$fields : array<string|int, mixed>
$files : array<string|int, mixed> = []
$self : CRM_Core_Form = NULL
Return values
array<string|int, mixed>|bool

if no errors

enforceRequired()

Should required fields be enforced.

private static enforceRequired(CRM_Core_Form $form) : bool

This would be FALSE if there were no other address fields present.

Parameters
$form : CRM_Core_Form
Return values
bool

        
On this page

Search results