Increase timeout for API actions
add_filter( ‘frm_api_request_args’, ‘extend_api_timeout’ ); function extend_api_timeout( $args ) { $args[‘timeout’] = 30; // change this return $args; }Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘frm_api_request_args’, ‘extend_api_timeout’ ); function extend_api_timeout( $args ) { $args[‘timeout’] = 30; // change this return $args; }Continue reading
add_filter( ‘frm_setup_new_fields_vars’, ‘translate_countries’, 20, 2 ); add_filter( ‘frm_setup_edit_fields_vars’, ‘translate_countries’, 20, 2 ); function translate_countries( $values, $field ) { $field_id = 4865; // change 4865 with the ID of your Country list dropdown field. if ( $field_id !== (int) $field->id )…Continue reading
add_filter(‘frm_validate_field_entry’, ‘check_valid_email’, 10, 3); function check_valid_email($errors, $posted_field, $posted_value){ if($posted_field->id == 7762){ //change 7762 to the ID of the email field $postedemail=$_POST[‘item_meta’][7762]; //Change 7762 to the ID of the email field $alloweddomain = explode(‘@’,$postedemail)[1]; if (!filter_var($postedemail, FILTER_VALIDATE_EMAIL) || $alloweddomain != ‘example.com’)…Continue reading
add_filter(‘frm_pre_create_entry’, ‘frm_choose_field_entry_name’); function frm_choose_field_entry_name( $values ) { $target_form_id = 781; // change 781 to your form ID if ( $target_form_id === (int) $values[‘form_id’] ) { $target_field_id = 4529; // change 4529 to the field that you want to use for…Continue reading
add_filter( ‘frm_form_enctype’, ‘custom_form_enctype’, 10, 2 ); function custom_form_enctype( $enctype, $form ) { $target_form_id = 832; // change 832 to your form ID. if ( $target_form_id === (int) $form->id ) { $enctype = ”; } return $enctype; }Continue reading
add_filter( ‘wc_fp_cart_item_data’, ‘modify_frm_woo_display_for_number_fields’, 10, 2 ); function modify_frm_woo_display_for_number_fields( $values, $args ) { if ( $args[‘field’]->type ==”number”) { $end_position = strpos( $values[‘display’], ‘ (‘ ); $values[‘display’] = substr( $values[‘display’], 0, $end_position ); } return $values; }Continue reading
add_filter( ‘frm_entry_formatter_class’, ‘use_custom_formatter_class’, 10, 2 ); function use_custom_formatter_class( $class, $atts ) { if ( ‘custom’ === $atts[‘format’] ) { return ‘CustomEntryFormatter’; } return $class; } class CustomEntryFormatter extends FrmEntryFormatter { public function __construct( $atts ) { parent::__construct( $atts ); $this->format…Continue reading
add_filter(‘frm_validate_entry’, ‘validate_unique_field’, 10, 2 ); function validate_unique_field( $errors, $values ) { if ( ! FrmProFormsHelper::saving_draft() ) { return $errors; } $field_id = 795; // change this to the ID of the unique field if ( ! isset( $values[‘item_meta’][ $field_id ]…Continue reading
add_filter(‘frm_order_lookup_options’, ‘frm_set_custom_lookup_order’, 20, 2); function frm_set_custom_lookup_order( $values, $order ) { if ( $order == ‘ascending’ ) { sort( $values ); } return $values; }Continue reading
add_filter(‘frm_form_action_limit’, function( $limit ) { return 200; //Change 200 to your limit } );Continue reading