Randomize order of field options

add_filter(‘frm_setup_new_fields_vars’, ‘frm_reorder_options’, 30, 2); function frm_reorder_options($values, $field){ if ( $field->id == 13676 ) {//Replace 13676 with the ID of your field shuffle($values[‘options’]); // sort the values here } return $values; }Continue reading

Update field in another form using entry id

add_action(‘frm_after_create_entry’, ‘frm_update_entry_in_other_form’, 30, 2); function frm_update_entry_in_other_form($entry_id, $form_id){ if ( $form_id !== 997 ) { //Change 997 to the ID of your update form return; } $entry_id = $_POST[‘item_meta’][9353]; //change 9353 to the ID of the field in your update form…Continue reading

Save the entry ID in a field

add_action(‘frm_after_create_entry’, ‘frm_add_entry_id’, 42, 2); function frm_add_entry_id($entry_id, $form_id){ if ( $form_id == 221 ) { //change 221 to the ID of your form FrmEntryMeta::add_entry_meta( $entry_id, 1819, “”, $entry_id);//change 1819 to the ID of the field in which you want to store…Continue reading

Remove a field option based on current date

add_filter(‘frm_setup_new_fields_vars’, ‘remove_field_option_by_date’, 30, 2); add_filter(‘frm_setup_edit_fields_vars’, ‘remove_field_option_by_date’, 30, 2); function remove_field_option_by_date( $values, $field ) { $today = time(); $close_date = strtotime ( “2020-06-20” ); // change 2020-06-20 to the date after which the option should be removed if ($field->id == 13677…Continue reading

Remove Label Column

add_filter( ‘frm_csv_columns’, ‘remove_label_column’, 10, 2 ); function remove_label_column( $headings, $form_id ) { if ( $form_id == 326 ) { //change 326 to your Form ID unset( $headings[‘4002_label’] ); //change 4002 to the field ID using separate values } return $headings;…Continue reading

Disable blacklist check for a single form

add_filter( ‘frm_check_blacklist’, ‘limit_check_blacklist’, 10, 2 ); function limit_check_blacklist($check, $atts){ if ( $atts[‘form_id’] == 25 ) { //replace 25 with the id of the form you would like to disable the blacklist check on. $check = false; } return $check; }Continue reading

Randomize Field Order

add_filter( ‘frm_get_paged_fields’, ‘randomize_form_fields’, 20, 2 ); function randomize_form_fields( $fields, $form_id ){ if ( $form_id == 25 ) { //change 25 to the id of the form to change shuffle( $fields ); } return $fields; }Continue reading

Populate a field with WordPress Tags

add_filter(‘frm_setup_new_fields_vars’, ‘frm_populate_tags’, 20, 2); add_filter(‘frm_setup_edit_fields_vars’, ‘frm_populate_tags’, 20, 2); function frm_populate_tags( $values, $field ) { if ( $field->id == 125 ) { //replace 125 with the ID of the field to populate // Adjust your tag aruments as needed $tags_args =…Continue reading