I tried to post this to an older post concerning hiding the article but was not able to.
==================
I have the same problem and both of these "solutions" would seem to be kludges. First, if the form is placed within an article it obviously means the page needs to show other information pertinent to filling out the form. The Thank You messages totally ignores this design requirement and shows the whole article, which is then completely out of context. Using an alternate URL for the Thank You is pointless if you need to display information based on a submission because the alternate URL does not receive a POST and does not have access to the form values.
Given rsform's manner of displaying the Thank You it seems the operation of a component link to the form and a form embedded in an article perform the same operation under the hood, which they do apart from the fact that whatever you put in the article is always shown. So rsform steals the functionality of your article by design.
That being said, the CSS workaround does work. But what's the point of adding to the complexity of the process by bagging one kludge on top of another? It just makes for more procedure with less transparency and that always spells trouble at some point in the future. As developers we're not supposed to do things like that.
An example of the proposed workaround is to first wrap all the parts of an article with a block level tag such as a div with a class attribute such as "article-wrap". Of course, make sure that the plugin specification is NOT within one of those blocks. Then include something like the following in the PHP Thank You script:
$thankYouMessage .= "<style>div.article-wrap{display: none;}</style>";
I think the best solution would be to place a switch next to "Show Thank You Message" that simply says "Hide Article." The plugin can then remove the text of the article before displaying the Thank You Message.
Another option would be to have another plugin that manages the article text and can strip it out when the Thank You message is being shown.
{rsform-article-text}
This part of the article only shows when the actual form is on the screen.
{/rsform-article-text}
Along the same lines, another option would be to expand the syntax of the plugin to something like the following:
{rsform x}
{if-form-is-shown}
This part of the article only shows when the actual form is on the screen.
{/if-form-is-shown}
{show-form-here}
{/rsform}
Still another option designed for those using a code insertion plugin is simply to post the form submission values to both the original article and the alternate URL.
Any of these four solutions would be preferable because they are specified as part of rsform's options and not as some hybrid hack buried at some unknown location.