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 Header Image to Emails

add_filter(‘frm_email_message’, ‘add_email_header’, 10, 2); function add_email_header($message, $atts) { //edit the email header image source to include an image URL of your choice $email_header = ‘<img src=”http://www.yoursite.com/images/email-header.jpg” alt=”Header” /><br />’; $message = $email_header . $message; return $message; }Continue reading

Offset Autoscroll

add_filter(‘frm_scroll_offset’, ‘frm_scroll_offset’); function frm_scroll_offset(){ return 170; //adjust this as needed }Continue reading

Disable Autoscroll

add_filter(‘frm_scroll_offset’, ‘frm_scroll_offset’); function frm_scroll_offset(){ return -1; //this will disable the autoscroll }Continue reading

Disable readonly for Admins

add_action(‘formidable_shortcode_atts’, ‘frm_admin_readonly’, 20, 2); function frm_admin_readonly( $atts, $all_atts ) { if ( $atts[‘readonly’] == ‘administrator’ ) { global $frm_vars; if ( current_user_can(‘administrator’) ) { $frm_vars[‘readonly’] = ‘disabled’; } else { $frm_vars[‘readonly’] = false; } } }Continue reading

Limit total number of entries

add_action(‘frm_display_form_action’, ‘limit_entry_count’, 8, 3); function limit_entry_count($params, $fields, $form){ remove_filter(‘frm_continue_to_new’, ‘__return_false’, 50); if ( in_array($form->id, array(5,6,7)) ) { //change 5, 6, and 7 to your form ID(s) $count = FrmEntry::getRecordCount($form->id); if ( $count >= 15 ) { //change 15 to your…Continue reading

Limit the number of entries per user

add_action(‘frm_display_form_action’, ‘check_entry_count’, 8, 3); function check_entry_count($params, $fields, $form){ global $user_ID; remove_filter(‘frm_continue_to_new’, ‘__return_false’, 50); if($form->id == 5 and !is_admin()){ //replace 5 with the ID of your form $count = FrmEntry::getRecordCount(“form_id=”. $form->id .” AND user_id=”.$user_ID); if($count >= 2){ //change 2 to your…Continue reading

Limit the number of entries per IP

add_action(‘frm_display_form_action’, ‘check_entry_count’, 8, 3); function check_entry_count($params, $fields, $form){ remove_filter(‘frm_continue_to_new’, ‘__return_false’, 50); if($form->id == 5 and !is_admin()){ //replace 5 with the ID of your form $count = FrmEntry::getRecordCount( array(‘form_id’ => $form->id, ‘it.ip’ => $_SERVER[‘REMOTE_ADDR’] ) ); if($count >= 2){ //change 2…Continue reading