I have a form that I'm using on several different language pages. The English page with the form works without issue. I also have the form on a Dutch and Spanish page, and I've created corresponding language versions of the form. When I try to submit the form on either of these language pages, I consistently get an error the first time (the form page reloads with an error message "We experienced a technical difficulty while processing your request. Your data may not have been correctly saved."). I see this error when I check the logs:
Web Forms for Marketers: an exception 'Sequence contains more than one matching element' has occured while trying to execute an action ''.
If I then click the submit button again, it works.
I'm also having trouble debugging this because I cannot replicate the behavior on my local environment. All I have to go on is the 'Sequence contains more than one matching element' error, and I'm not sure what that's referring to or why it works the second time.
Edit 1: The issue is with my States field. I have a field for states that displays/is required if the country selected is US. I think the error is from trying to submit an empty value for State when the country is not US
Edit 2: The error occurs with the States field even when an option is selected, so it's not a matter of the field being blank. I think it's an issue with the data it's using, though I'm not sure what the problem is
So, my state field is a custom field. It is empty on page load and then populates once the country is selected by pulling a list of states/provinces for the selected country from Sitecore. There are different lists for USA, Canada, Australia, etc so I cannot just set it to US states and hide/display. I removed the custom validation, which it turns out wasn't even doing anything.
The states list functions just like what's described in this post: WFFM: dynamically populated dependent drop lists