Address Field is basically without settings. Main issue is how to display it on CRED, in sense to appear map by itself, when geolocation is not available (for HTTPS lack).
So, I set in CRED value of initial point as:
<div class="form-group">
<div style="color: #034ea2;"><label>[wpml-string context='cred-form-Formulario de sitios-34' name='Ubicación del sitio']Ubicación del sitio[/wpml-string]</label><span style="color: #ed1c24; font-weight: 900;"> *</span></div>
<p><span style="color: #666666;">Puede aumentar el nivel de enfoque del mapa y afinar al máximo la ubicación del sitio.</span></p>
[cred_field field='ubicacion-del-sitio' post='sitio' value='{-0.4615292821230493,-80.45515763523065}' urlparam='' class='form-control' output='bootstrap']
</div>
and I have initial look as on shot 1 (map is active/visible), what is perfect), but it should to be like in shot 2 (see placeholder). It appear like in shot 2, when I click on placeholder.
Hopefully, it is clear.
How to achieve that?
I forgot to mention one important and negative side effect of inserting value in CRED.
When I check in Fields settings as obligatory field, problems appears if user will not change value (pointer) and I don't know how to solve it (also).
In other words, it looks that my idea to get the map in CRED by setting the value is not exactly the 'great idea'.
Main issue is how to display it on CRED, in sense to appear map by itself, when geolocation is not available (for HTTPS lack).
CRED does not have a JavaScript API available, so the amount of customization here is very limited. You can predefine a value in the cred_field shortcode, but there is no setting to show the map without a value.
and I have initial look as on shot 1 (map is active/visible), what is perfect), but it should to be like in shot 2 (see placeholder). It appear like in shot 2, when I click on placeholder.
The only way to show a map with a marker when the page loads is to define the value attribute in the cred_field shortcode. You can use the latitude and longitude, or you can use any geocode friendly address like "Calle Javier Santos, Canoa, Ecuador".
[cred_field field='ubicacion-del-sitio' post='sitio' value='{-0.4615292821230493,-80.45515763523065}' urlparam='' class='form-control' output='bootstrap']
or
[cred_field field='ubicacion-del-sitio' post='sitio' value='Calle Javier Santos, Canoa, Ecuador' urlparam='' class='form-control' output='bootstrap']
When I check in Fields settings as obligatory field, problems appears if user will not change value (pointer) and I don't know how to solve it (also).
Can you provide more details about the problems? Screenshots will be helpful. I tested this on a live site here:
lien caché
I have sent you a login invitation so you can test as well. The Address field is required, and I have provided a default latitude / longitude value. If I fill out all the other information in the form, but do not change the Address, I am able to save the new Tour post correctly. The Address appears in the post's custom fields in wp-admin.
Sorry I just realized the invitation will not work unless you sign up for an account at discover-wp.com. Let me know if you have an account and would like to test the CRED form.
"The Address field is required, and I have provided a default latitude / longitude value. If I fill out all the other information in the form, but do not change the Address, I am able to save the new Tour post correctly. The Address appears in the post's custom fields in wp-admin."
That is exactly what I wrote and that is WRONG.
It mean (assuming that default pin is Central Park) that if visitor forget to 'FIX' location coordinates, form will be proceeded with 'success' as default value is already inserted and I will get (expression) thousands of hotels in Central Park (at exact same place).
From other side, if default coordinates are not inserted via CRED shortcode, map appear GRAY and most visitors will be confused what to do.
So, point is - How to force visitor to move the pin from default coordinates (checking 'obligatory' will not do it - we already agree about it)?
Sorry but the Address field does not work like this. It is not designed to show a map unless the User selects an Address, or specifies their own location. If HTTPS is not available, and the value attribute is not predefined in the cred_field shortcode, it is not possible to show a map until something is entered by the User in the input field. CRED does not offer a JavaScript API, so there's not much we can do to customize this feature right now. If this is important to your project, then I can suggest this as an improvement, or feature request, to our developers. I can't guarantee they will implement it, but I can request it.
Well, I think that it is very important feature, as that is completely different from auto-located user. Example, tour info website and visitor from France is in New York page. It not sounds logical to open map of France (by auto-location) when he want to add listing of his property in New York - right? New York pages should to open New York map (or I'm wrong)?
So, I didn't asked nothing else than that - how to do it?
BTW - is it mean that if I have SSL and set HTTPS address of website, visitors will get opened they own location in the map (with or without sking them for permission?)?
So, I didn't asked nothing else than that - how to do it?
The answer is you cannot do it.