Subtotal: $17,583.00
I need to check if someone already submitted a form with a certain email address. If so, they must receive a message...
To check this I thought Form Action > On Form Validation > Execute SQL would be the way to go, and I used this:
SELECT COUNT(*) FROM LiveForms_SubmissionInfo WHERE FieldValue = '[email protected]' AND FieldGUID='F9C9CE7A-5494-453F-AFD5-450B2171D4AD'; And beneath that I used IF SQL RESULT Is Not Equal To 0
I also checked this in Management Studio first and it returned 0 befóre the first time I submitted and 1 áfter the first time I submitted, so the returnvalue should do it...
But... no message in my Live Form!
What am I doing wrong??
SELECT COUNT (*) FROM LiveForms_SubmissionInfo WHERE (FieldGUID = 'F9C9CE7A-5494-453F-AFD5-450B2171D4AD') AND (FieldValue = '[E-mailadres]')
with
IF SQL RESULT Is Not Equal To 0
also doesn't work...
You should not use FieldGUID('F9C9CE7A-5494-453F-AFD5-450B2171D4AD') in the SQL action.
I would recommend you following solutions:
First Solution:
Specify SQL query without FieldGUID like SELECT COUNT(*) FROM LiveForms_SubmissionInfo WHERE FieldValue = '[email protected]'
Second Solution:
SELECT COUNT(*) FROM LiveForms_SubmissionInfo WHERE FieldValue = '[email protected]' AND FieldGUID='F9C9CE7A-5494-453F-AFD5-450B2171D4AD';
Tnx Ashish,
I need to have 0 or 1 returned from the SQL-action. It should check if an email address exists. If it does it should not return 0 and a message should appear; if it doesn't it should return 0, all is ok and no message should appear.
SELECT COUNT(*) FROM LiveForms_SubmissionInfo WHERE FieldValue = '[E-mailadres]'
does not work, where it should return 0
I'll go ahead and try the second option...
Make sure you are seeing validation after submitting the form because The validation will be visible once you submit the form.
mmm. also not working. Just to be clear: I need to check the email address that the user fills in at that moment... so I'm working with the field [e-mailadres] and not with a set value...
Please open a support ticket regarding this through https://www.mandeeps.com/support/standard so that we can take a look.
ok, I found out that the second option works only without the single quotes surrounding the email address in the SQL-query.
So...
SELECT COUNT(*) FROM LiveForms_SubmissionInfo WHERE FieldValue = [Emailadres] AND FieldGUID='F9C9CE7A-5494-453F-AFD5-450B2171D4AD';
works!
Tnx
Your browser doesn't have Flash, Silverlight or HTML5 support.
Very information article.