Q: How to conditionally pass a parameter to wordpress search to limit post types? I have a site with a subsection containing a custom post type, "artwork"
I have an overall site search working how I'd like it to - it searches all of my posts and custom post types.  I would like to add a second search inside of my artwork subsection, that only searches the "artwork" custom post type.  I know I can limit my search results like this:
function mySearchFilter($query) {

    if ($query->is_search) {
            $query->set('post_type','artwork');
    };
    return $query;
};

add_filter('pre_get_posts','mySearchFilter');

But that affects the sitewide search too. How can I set the post type ONLY on certain instances of the search form?  I don't need a dropdown or any way for the user to choose, there are just certain pages where I'd like to include limited search instead of the overall site search.

A: If you have a "natural" artwork archive (typically setting has_archive to true in your register_post_type() arguments), you already have the functionality in place:
http://example.com/artwork/?s=query

...assuming artwork is your archive slug, WordPress will search only artwork for "query".
Just set the action attribute of the search form to the archive URL, like so:
<form action="<?php echo get_post_type_archive_link( 'artwork' ) ?>">

