function conditional_fields_insert_field in Conditional Fields 6
Same name and namespace in other branches
- 6.2 conditional_fields.module \conditional_fields_insert_field()
Insert into database the data of a new conditional field
1 call to conditional_fields_insert_field()
- 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 1063 - 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));
}