As per your question it seems that you are using get as a method in the form and because of that it is giving disallowed key characters
error.
To allow the character # just add it in the following in your CONFIG file -
$config['permitted_uri_chars'] = '\#';
And now the character # will be allowed in the url.