Skip Navigation

[Resolved] User Location in Post Form on Siteload

This support ticket is created 6 years, 3 months 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 6 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#1149175

Dear Support,

i try to create a user registration form where visitors can post emailadress & location to get notified if an event is near there location later. for this i created a user custom post type & genrated a frontend form. The problem here is that i cant create the user location data right when the site loads, so that the user get location feedback in the "user-location" input field based on his ip adress. example, please see bellow

Thank You!
Sammy.

[wpv-geolocation][/wpv-geolocation]
[credform]
[cred_field field="form_messages" class="alert alert-warning"]
<div class="form-group">
<label>User Location</label>

[cred_field field="user-location" force_type="field" class="form-control" output="bootstrap" urlparam="[wpv-geolocation][/wpv-geolocation]"]
</div>
<div class="form-group">
<label>User Email</label>
[cred_field field="user-email" force_type="field" class="form-control" output="bootstrap"]
</div>
[cred_field field="form_submit" output="bootstrap" value="Submit" class="btn btn-primary btn-lg"]
[/credform]

#1149387

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sebastian,

Thank you for contacting our support forum.

Are you using some form of custom code to get the user's current location ?

Thanks,
Shane

#1149439
Edit View 2018-11-20 00.12.52.png

Hello Shane,

thanks for your feedback.

>Are you using some form of custom code to get the user's current location ?
No, for this i'm using the "Toolset Map" Plugin.
The "[wpv-geolocation]" shortcode was generated through a View Form (pl. see image attached) i have copied this in the CRED Post Form but it doesnt generate anything.

Best,
Sammy.

#1149970

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sebastian,

Thats correct because this shortcode is to allow for geo restricted contents, not to get the users geo location.

Thanks,
Shane