I have survey on my website. The site requires users to login first and then they are able to take the survey. I am having a weird result when the submit button is clicked. Initially a row is inserted into the database but does not contain the user_id. Almost immediately another row is inserted with only the user_id and no other information. Does anyone know what might be happening to cause this. A sample of this is attached.
Thanks,
James
[[>> Image removed: Greyhead <<]]
Hi James,
Do you have more than one DB Save action? (Or custom code to save a record?)
Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.
Note: if you are using the Easy Wizard you can turn on Debug on the Others tab.
Bob
Hi jlcarpenter,
I don't see anything there that would trigger a second db query unless there is some elusive bug in the code? I assume that it does the update correctly?
Bob
The only problem is what is shown in my previous post. Sometimes the user_id and other user info is not recorded in the initial submit. Somehow a subsequent submit is done that records only the user info.
I have looked further and have a possible cause of the problem. We are using LDAP for validation and user creation. It seems that maybe if the users take the survey on the initial login that is when the problem occurs.
Hi jlcarpenter,
I've never used LDAP so can't comment much. If it's an asynchronous connection then it could well be that the registration form is being 'hit' twice. That would explain the two saves.
Bob