This support ticket is created 7 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Hi is it possible to add autocomplete to an address field using Toolset (Types and Cred)? If so could you point me in the right direction of your documentation
If you use our toolset maps plugin it comes with a custom field that you can setup in Types called address which allows you to add an address to a field. It uses the google maps API to autocomplete the addresses.
Hi Shane I implemented this but I don't think it was quite what I meant (or i'm doing it wrong!)
I created a field using the Google Maps Address custom field in Types and then generated a CRED form using the auto wizard. There are 2 issues
1) There is a large blank box on my front end CRED form. Filling in the field populates the map, which is unnecessary. I am just trying to get the address of the person filling in my form. Is there way of removing the map?
2) I need them to fill in their complete address including country, postcode etc. Is there a way to add validation to the custom address field?
So I guess is there any way of doing both these things using the Maps Plugin or is that not really what it is intended for - bearing in mind I am not trying to plot things on a map, i'm just trying to make the address field autocomplete as a usability improvement for my form
In response to your questions.
1. You are able to hide the map using some css. The reason why the map is empty is because there isn't any information in the address field as yet.
2. Since their is an autocomplete on the field based on google then all the information should be populated when the user fills in the information. A custom validation would require that you do string comparisons using regular expressions, but this will expect that the address will be in a certain format. So the field won't validate if there are 2 addresses but they are formatted differently or some addresses have a little more information than others.
I wouldn't impose a validation on an address since there would be so many variables to account for.
Thanks Shane - that makes sense! The only problem is that the address field doesn't force them to enter a zip code or postcode, which we need, as it is a form I am creating to send orders to people. So we need to ensure they are filling in the full address. Is there a way to enforce just this?