// Automatically count up sequentially (1,2,3...) on every form load add_filter('elementor_pro/forms/render/item/hidden',function($field,$field_index,$form){// Only run this on our specific unique ID field if (isset($field['id']) && 'unique_id'===$field['id']){// 1. Get the current count stored in your site's database (defaults to 0 if brand new)
        $current_count = get_option( 'my_form_submission_counter', 0 );
        
        // 2. Add 1 to the count
        $next_number = $current_count + 1;
        
        // 3. Save the new number back to the database for the next visitor
        update_option( 'my_form_submission_counter', $next_number );
        
        // 4. (Optional) Turn the number into a clean format like #0001 instead of just 1
        $formatted_number = '#' . str_pad( $next_number, 4, '0', STR_PAD_LEFT );
        
        // 5. Inject the number into Elementor's hidden field $field['field_value']=$formatted_number}return $field},10,3);