Reduce the ChatGPT model temperature
add_filter( ‘frm_ai_data’, ‘frm_reduce_ai_temp’ ); function frm_reduce_ai_temp( $data ) { $data[‘temperature’] = 0.2; return $data; }Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘frm_ai_data’, ‘frm_reduce_ai_temp’ ); function frm_reduce_ai_temp( $data ) { $data[‘temperature’] = 0.2; return $data; }Continue reading
add_filter(‘frm_pdfs_css’, ‘custom_font_pdfs_css_entry’ ,10, 2); function custom_font_pdfs_css_entry( $css, $args ) { if ( empty( $args[‘id’] ) ) { // Check for entry ID. return $css; } if ( is_secondary_language_view( $args[‘id’] ) ) { return $css; } $custom_css = ‘body { font-family:…Continue reading
add_filter(‘frm_pro_show_password_icons’, ‘change_password_icons’); function change_password_icons( $icons ) { $icons[‘show’] = ‘new show icon’; $icons[‘hide’] = ‘new hide icon’; return $icons; }Continue reading
add_filter(‘frm_conf_input_backend’, ‘wrap_email_conf_input’, 10, 2); function wrap_email_conf_input( $input_html, $args ) { if ( ’email’ === $args[‘field’][‘type’] ) { $input_html = ‘<span>’ . $input_html . ‘</span>’; } return $input_html; }Continue reading
add_filter(‘frm_validate_field_entry’, ‘store_address_coordinates’, 10, 3); function store_address_coordinates($errors, $posted_field, $posted_value){ $fields = array( 31014, 31015); //Change 31014 and 31015 to IDs of the hidden fields where the longitude and latitude coordinates should be stored. if ( in_array( $posted_field->id, $fields ) ) {…Continue reading
add_filter(‘frm_validate_entry’, ‘generate_item_key’, 20, 2); function generate_item_key($errors, $values){ if ( $values[‘form_id’] == 671 && $values[‘frm_action’]== “create” ) { //Change 45 to the ID of your form $validchars = ‘0123456789abcdefghijklmnopqrstuvwxyz’; //Change the string to your preferred characters $generatedkey = substr(str_shuffle($validchars), 0, 7);…Continue reading
add_filter(‘frm_prepare_data_before_db’, ‘save_field_as’, 10, 2); function save_field_as( $value, $field_id ) { $target_field_id = 122; if ( $target_field_id !== (int) $field_id ) { return $value; } if ( is_numeric( $value ) && 1 === strlen( $value ) ) { $value = ‘0’…Continue reading
add_filter(‘frm_success_filter’, ‘prevent_redirect_action’ , 10, 2); function prevent_redirect_action( $type, $form, $action ) { if ( $form->id != 5 || ‘update’ != $action ) { return $type; } if ( ‘redirect’ == $type ) { return ‘message’; } if ( is_array( $type…Continue reading
add_filter( ‘frm_pdfs_email_attachment_args’, ‘add_view_to_attached_pdf’, 10, 2 ); function add_view_to_attached_pdf( $pdf_args, $args ) { $pdf_args[‘view’] = 10; // ID of view. $pdf_args[‘id’] = $args[‘entry’]->id; // Do this to show the detail view, otherwise, it shows the listing view. return $pdf_args; }Continue reading
add_filter( ‘frm_pdfs_email_attachment_args’, ‘change_attached_pdf_file_name’, 10, 2 ); function change_attached_pdf_file_name( $pdf_args, $args ) { $pdf_args[‘filename’] = ‘stuff’; return $pdf_args; }Continue reading