Skip to content

Instantly share code, notes, and snippets.

@New0
Created February 1, 2018 15:12
Show Gist options
  • Select an option

  • Save New0/a2d22108eaf7eacd380a66411b46c56a to your computer and use it in GitHub Desktop.

Select an option

Save New0/a2d22108eaf7eacd380a66411b46c56a to your computer and use it in GitHub Desktop.

Revisions

  1. New0 revised this gist Feb 1, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions CF-remove-field-from-entry.php
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    <?php
    /**
    * Remove a field from the entry saved in the DB without removing it from the emails
    */
  2. New0 created this gist Feb 1, 2018.
    10 changes: 10 additions & 0 deletions CF-remove-field-from-entry.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    /**
    * Remove a field from the entry saved in the DB without removing it from the emails
    */
    add_action( 'caldera_forms_submit_complete',function( $form, $referrer, $process_id, $entryid ){

    unset( $form['fields']['fld_8768091'] );

    Caldera_Forms_Save_Final::save_in_db( $form, $entryid );

    }, 10, 4 );