You are here

function conditional_fields_insert_field in Conditional Fields 6.2

Same name and namespace in other branches
  1. 6 conditional_fields.module \conditional_fields_insert_field()

Insert into database the data of a new conditional field

2 calls to conditional_fields_insert_field()
conditional_fields_features_rebuild in includes/conditional_fields.features.inc
Implmentation of hook_features_rebuild()
conditional_fields_save_field in ./conditional_fields.module
Handle saving of individual controlled field settings $controlling_fields is a keyed array of controlling fields names and trigger values

File

./conditional_fields.module, line 1317
Content fields and groups visibility based on the values of user defined 'trigger' fields.

Code

function conditional_fields_insert_field($type_name, $controlled_field, $controlling_field, $trigger_values) {
  db_query("INSERT INTO {conditional_fields} (control_field_name, field_name, type, trigger_values) VALUES ('%s', '%s', '%s', '%s')", $controlling_field, $controlled_field, $type_name, serialize($trigger_values));
}