frm_after_duplicate_entry

Back to Top
Knowledge BaseEntry Management → frm_after_duplicate_entry

This hook allows you to something after an entry has been duplicated.

Usage

add_action('frm_after_duplicate_entry', 'frm_duplicated_draft', 10, 3);

Parameters

  • $entry_id (int)
  • $form_id (int)
  • $args (array)

Examples

Formidable Hook - Helpful

Set Duplicate Entry to Draft

Submitted by  — 8 years ago

This example sets the duplicate entry to a draft status after it's creation.

add_action( 'frm_after_duplicate_entry', 'frm_duplicated_draft', 10, 3 );
function frm_duplicated_draft( $entry_id, $form_id, $args ){
  if ( $form_id == 5 ) {
    global $wpdb;
    $wpdb->update( $wpdb->prefix .'frm_items', array('is_draft' => 1), array( 'id' => $entry_id ) );
  }
}
If you would like to add your own example, click here.

Have something to add?

Click here to provide feedback on this page.