You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @germanrandhawa, nice to see you back! How’s everything going?
Based on the information you've provided, it seems like the issue might be related to how Contact Form 7 is processing the form data.
For the city field, make sure that the value of the selected option is being correctly set and passed when the form is submitted. The value of the selected option should be the one that appears in the email, not the attribute name. If the value is not being set correctly, it could result in "undefined" appearing in the email.
As for the country and state fields printing codes instead of full names, this is likely due to how the data is structured in the countries-states-cities-database repository. The country and state data is stored using their respective codes, not their full names.
To print the full names instead of the codes, you would need to map the codes to their corresponding names. This could be done by creating a lookup table or dictionary that maps each code to its full name, and then using this to replace the codes with their full names in the email.
Here's a simple example of how you could create such a lookup table for countries:
Hi,
I am using contact form 7 and added the name attribute on select as below.
Select CityHere is my Message body code:
City: [city]
The text was updated successfully, but these errors were encountered: