Encode UTF-8 with BOM
add_action(‘frm_csv_headers’, ‘frm_bom_csv’); function frm_bom_csv() { echo chr(239) . chr(187) . chr(191); }Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_action(‘frm_csv_headers’, ‘frm_bom_csv’); function frm_bom_csv() { echo chr(239) . chr(187) . chr(191); }Continue reading
add_action( ‘frm_after_duplicate_entry’, ‘frm_duplicated_draft’, 10, 3 ); function frm_duplicated_draft( $entry_id, $form_id, $args ){ if ( $form_id == 5 ) { global $wpdb; $wpdb->update( $wpdb->prefix .’frm_items’, array(‘is_draft’ => 1), array( ‘id’ => $entry_id ) ); } }Continue reading
add_filter(‘frm_email_control_settings’, ‘frm_load_email_settings_with_ajax’); function frm_load_email_settings_with_ajax($settings){ $settings[‘ajax_load’] = true; return $settings; }Continue reading
add_filter( ‘frm_graph_data’, ‘change_my_graph_labels’, 10, 2 ); function change_my_graph_labels( $data, $atts ) { if ( isset( $atts[‘title’] ) && $atts[‘title’] == ‘My graph’ ) { $new_labels = array( ‘First label’, ‘Second label’, ‘Third label’ ); foreach ( $new_labels as $key =>…Continue reading
add_filter(‘frm_entries_before_create’, ‘yourfunctionname’, 30, 2); function yourfunctionname( $errors, $form ) { if($form->id == 5){ //replace 5 with the id of the form $args = array(); if(isset($_POST[‘item_meta’][30])) //replace 30 and 31 with the appropriate field IDs from your form $args[‘data1’] = $_POST[‘item_meta’][30];…Continue reading
add_filter( ‘frm_pre_update_entry’, ‘check_if_value_changed’, 10, 2 ); function check_if_value_changed( $values, $entry_id ) { $field_id = 125; // change 125 to the id of the field to check $previous_value = FrmEntryMeta::get_entry_meta_by_field($entry_id, $field_id); if ( isset( $values[‘item_meta’][ $field_id ] ) && $values[‘item_meta’][ $field_id…Continue reading
add_filter( ‘frm_default_templates_files’, ‘stop_default_templates’, 30 ); function stop_default_templates(){ return array(); }Continue reading
add_filter(‘frm_csv_format’, ‘set_frm_csv_format’); function set_frm_csv_format(){ return ‘windows-1256’; }Continue reading
add_filter(‘frm_csv_value’, ‘frm_csv_value’, 10, 2); function frm_csv_value($value, $atts){ if($atts[‘field’]->id == 25){ //change 25 to your field id $value = ‘new value here’; } return $value; }Continue reading
add_filter( ‘frm_csv_columns’, ‘remove_id_column’, 10, 2 ); function remove_id_column( $headings, $form_id ) { if ( $form_id == 5 ) { //change 5 to your Form ID unset( $headings[‘id’] ); //change id to the header of the column to be removed }…Continue reading