The Location Type ID should be set from the Form Config regardless of whether it is a create or edit operation.
Before
Say, for example, a Caldera Form's CiviCRM Address Processor settings are changed and a different Location Type is chosen - Addresses that are updated after this change has been made to the Processor will not have their Location Type updated.
After
Addresses that are updated after changing a Caldera Form's CiviCRM Address Processor Location Type setting will have their Location Type updated.
Technical Details
Simply cleans up the create/edit logic such that the Address ID is the only item that is optionally added.
FYI, this was discovered because the civicrm_post hook only includes the data that is submitted in the API call. Since the Location Type ID was missing in Address edit operation, various downstream changes that relied on the presence of the Location Type ID did not occur.
Overview
The Location Type ID should be set from the Form Config regardless of whether it is a
create
oredit
operation.Before
Say, for example, a Caldera Form's CiviCRM Address Processor settings are changed and a different Location Type is chosen - Addresses that are updated after this change has been made to the Processor will not have their Location Type updated.
After
Addresses that are updated after changing a Caldera Form's CiviCRM Address Processor Location Type setting will have their Location Type updated.
Technical Details
Simply cleans up the
create
/edit
logic such that the Address ID is the only item that is optionally added.FYI, this was discovered because the
civicrm_post
hook only includes the data that is submitted in the API call. Since the Location Type ID was missing in Addressedit
operation, various downstream changes that relied on the presence of the Location Type ID did not occur.