Question ID not set

Permalink
Sometimes my users (valid users, not spam) are seeing this error;

Oops, something is wrong with the form you posted (it doesn't have a question set id).


I can find where it happens, but why does it happen?

The code seems simple enough;

//question set id
$qsID=intval($_POST['qsID']); 
if($qsID==0)
   throw new Exception(t("Oops, something is wrong with the form you posted (it doesn't have a question set id)."));


But I need to understand further what this is and why it is here?

Thanks

yolk
 
goldhat replied on at Permalink Reply
I'd go to the page where the form is and view the source and search for "qsID". Because that code is basically saying that qsID is 0, causing the error, when it should be a number. Now if you have multiple forms you can check them and see what might be different between them.

I checked this on a form I have and it reads like this:

<input name="qsID" type="hidden" value="1388885758" />


Not sure though what might cause this to have a zero value. You might try rebuilding the form or part of it and see if that changes the qsID value.