Introduction
The Feed Meta Object for the Kit Add-On is an associative array with properties determining how the add-on should process the form submission.
$feed['meta'] = array(
'feed_name' => 'Kit Feed',
'form_id' => '5500223',
'tag_id' => '4282109',
'convertkit_custom_fields' => array(
0 => array(
'key' => '',
'custom_key' => '',
'value' => '',
'custom_value' => '',
),
),
'feed_condition_conditional_logic_object' => array(),
'feed_condition_conditional_logic' => '0',
'field_map_email' => '',
'field_map_name' => '',
'field_map_tag' => '',
'conditions' => '',
'trial_product' => NULL,
'trial_amount' => NULL,
);
Usage
We recommend accessing the $feed meta using the rgar() or rgars() functions, e.g.:
$conditional_logic_enabled = rgars( $feed, 'meta/feedCondition' );
if ( $conditional_logic_enabled ) {
// Conditional logic is enabled for this feed.
$logic_rules = rgars( $feed, 'meta/feed_condition_conditional_logic_object/conditionalLogic/rules' );
foreach ( $logic_rules as $rule ) {
// Process each conditional logic rule.
$field_id = rgar( $rule, 'fieldId' );
$operator = rgar( $rule, 'operator' );
$value = rgar( $rule, 'value' );
// Example: Use $field_id, $operator, and $value in your logic.
}
}
Properties
Property | Type | Description |
---|---|---|
feed_name | string | A unique name for the Kit feed. |
form_id | string | The ID of the form associated with the feed. |
tag_id | string | The ID of the tag to be assigned. |
convertkit_custom_fields | array | An array of custom fields to map additional data. |
feed_condition_conditional_logic_object | array | Stores the conditional logic rules for the feed. Empty if no rules are defined. |
feed_condition_conditional_logic | boolean | Determines whether conditional logic is enabled for the feed. |
field_map_email | integer | Specifies the field ID used to map the email address. |
field_map_name | string | Specifies the field ID used to map the name. |
field_map_tag | string | Specifies the field ID used to map the tag. |
conditions | string | Specifies additional conditions for running the feed. |
trial_product | null | Specifies the trial product. NULL if not applicable. |
trial_amount | null | Defines the trial amount. NULL if not applicable. |
Custom Fields Properties
array(
'key' => '',
'custom_key' => '',
'value' => '',
'custom_value' => '',
);
Setting | Type | Description |
---|---|---|
key | string | The name of the custom field. |
custom_key | string | Custom key if any. |
value | string | The ID of the form field or entry meta item contains this custom field’s value. Merge tags supported. |
custom_value | string | Custom value for the field. |