Skip to content

Forminator: Custom multiple upload folder

add_action('forminator_form_after_handle_submit', 'wpmudev_uploaded_filename_fix', 10, 2); add_action('forminator_form_after_save_entry', 'wpmudev_uploaded_filename_fix', 10, 2); function wpmudev_uploaded_filename_fix($form_id, $response) { if ( $form_id != 761 ) { return; } if ( $response && is_array( $response ) ) { if ( $response['success'] ) { $attachment_ids = array(); $data =…

Mehr Lesen

Forminator: Use submitted data after submission

add_filter('forminator_custom_form_submit_field_data', 'custom_form_submit', 11, 2); function custom_form_submit($field_data_array, $form_id){ //Todo: some code return $field_data_array; } https://stackoverflow.com/questions/73498116/how-to-get-submitted-data-from-wordpress-forminator-form-after-sumission

Mehr Lesen

Forminator: Prevent multiple submissions from same email

add_filter('forminator_custom_form_submit_errors', function( $submit_errors, $form_id, $field_data_array ) { global $wpdb; // Retrieve the email value from the form field $form_email = $field_data_array[1]['value']; $sql = $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->prefix}frmt_form_entry_meta WHERE meta_value = %s", $form_email ); $results = $wpdb->get_results($sql); if (!empty($results) &&…

Mehr Lesen
An den Anfang scrollen