Restrict by IP address
An update to bogdanc's code that works with RSForms 1.3.0 and above.
// Determine the IP address for the user
$rsip =$_SERVER['REMOTE_ADDR'];
// Look up the IP address and see if it's already submitted for your form (suggestion: check your FormId number is correct)
if (mysql_num_rows(mysql_query("SELECT `SubmissionID` FROM `jos_rsform_submissions` WHERE `UserIP`='".$rsip."' AND `FormId`='3' LIMIT 1")) > 0)
// If the IP address already exists, display alternative content for the form layout (suggestion: copy your thank you message)
$formLayout = 'You have completed this form already.';
Note that you need to change the FormId value to your Form number, and modify the value of $formLayout to what you want to have displayed instead of the form. In the form I created, it was to gather information before displaying videos to a client. The videos were displayed on the thank you message for the form, so my $formLayout field is set to the HTML contents of the thank you message.
You'll also need to be careful of ' " ` in your code, as this can cause a range of errors from incorrectly displaying HTML, through to what may be the cause of ashley.barnard and mutwirik3's problem - if the ' and ` are interchanged on the mysql statement, then it can cause the supplied argument error (or that's what I think is the first thing you should check).