Change ReCaptcha Language

add_filter(‘frm_recaptcha_lang’, ‘change_my_captcha_lang’, 10, 2); function change_my_captcha_lang($lang, $field){ if($field[‘id’] == 25) { //change 25 to the ID of the first captcha field to change $lang = ‘fr‘; //change this to the language code of your choice } return $lang; }Continue reading

Add a class to an input field

add_filter(‘frm_field_classes’, ‘add_input_class’, 10, 2); function add_input_class($classes, $field){ if($field[‘id’] == 25){ //change 25 to the ID of your field $classes .= ‘ my_class’; } return $classes; }Continue reading

Only show form to logged-out users

add_action(‘frm_display_form_action’, ‘close_my_form’, 8, 3); function close_my_form($params, $fields, $form){ remove_filter(‘frm_continue_to_new’, ‘__return_false’, 50); if($form->id == 6){ //remove this section or change 6 to a form ID if(is_user_logged_in()){ echo ‘You are logged in’; add_filter(‘frm_continue_to_new’, ‘__return_false’, 50); } } }Continue reading

Change Submit button text

add_filter(‘frm_submit_button’, ‘change_my_submit_button_label’, 10, 2); function change_my_submit_button_label($label, $form){ $label = ‘New Submit Label’;//Change this text to the new Submit button label return $label; }Continue reading

Add OnClick event

add_action(‘frm_submit_button_action’, ‘your_function_name’); function your_function_name($form){ if($form->id == 5){ //change 5 to the ID of the form you would like this inserted in echo ‘ onclick=”do something”‘; } }Continue reading

Replace Form Success/Update Message

add_filter( ‘frm_main_feedback’, ‘frm_main_feedback’, 20, 3 ); function frm_main_feedback( $message, $form, $entry_id ) { if ( $form->id == 125 ) { //Replace with the ID of your form $message = ‘Change the message here’; } return $message; }Continue reading

Add a class to a form

add_action( ‘frm_form_classes’, ‘frm_form_classes’ ); function frm_form_classes( $form ) { if ( $form->id == 25 ) { //Change 25 to the ID of your form echo ‘new_class’; } }Continue reading

Add a class to all forms

add_filter(‘frm_form_fields_class’, ‘add_form_class’, 10, 2); function add_form_class($classes, $form_values){ $classes .= ‘ my_class’; //replace my_class with the name of your class return $classes; }Continue reading

Load a style

add_filter(‘frm_ajax_load_styles’, ‘frm_ajax_load_styles’); function frm_ajax_load_styles($styles){ $styles[] = ‘dashicons’; // change this to the enqueued name of the style to load return $styles; }Continue reading