Add CPT to search results with pre_get_posts

I found a partial solution. When I add this part of code into my search form:

<input type="hidden" name="post_type[]" value="my_CPT_name" />

search results contains my CPT (even when ‘exclude_from_search’ is set to ‘true’).

Now, I change my pagination code to this:

<?php
echo paginate_links( array(
    'total' => $wp_query->max_num_pages,
    'prev_text'          => __(' « '),
    'next_text'          => __(' » '),
) );
    ?>

(@Jacob Peattie you mention that)

and everything works! But this hidden input makes URL ugly because when I search something, in search URL adress I see names of my every CPT… I still count for other advice so I do not mark my answer as a solution 🙂

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)