Type: New Feature
Affects Version/s: None
Fix Version/s: 1.4
Site administrators need the ability to assign a value custom contribution fields "automatically" by passing them in the link/url when an Online Contribution Page is loaded. For example, if they've created a custom field for "Promotion" - extends Contribution, and this field is custom_12...
When the custom field identifier and a value for that field is included in the URL, that custom field and value is added to the session and then saved when (and if) a successful contribution is made (e.g. when the civicrm_contribution record is inserted).
Validation - prior to adding field/value pair to the session:
- Validate custom field identifier(s). If "no such custom field" or field doesn't extend contribution - toss (ignore) the pair. We will not throw an error (since URL's could have gotten messed up by end-user/email formatting/etc.)
- For valid custom field id's - validate value to allowed data type (string, date, int, number, yes/no -e.g. 1/0). If value not valid, toss (ignore) the pair (again - do not throw an error).
Save valid custom field values on success (in example above, "WinterFest-2006" is saved as value for custom_12 for the new contribution record.