Skip Navigation

[Gelöst] Upload of address and coordinates with Cred

This support ticket is created vor 3 Jahre, 4 Monate. There's a good chance that you are reading advice that it now obsolete.

Dies ist das technische Support-Forum für Toolset – eine Suite von Plugins zur Entwicklung von WordPress-Websites ohne PHP-Pogrammierung.

Jeder kann in diesem Forum lesen, aber nur Toolset-Kunden können darin Beiträge veröffentlichen. Der Toolset-Support arbeitet 6 Tage pro Woche, 19 Stunden pro Tag.

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

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 13 Antworten, has 2 Stimmen.

Last updated by Minesh vor 3 Jahre, 4 Monate.

Assigned support staff: Minesh.

Author
Artikel
#1623289

Hi,
If I fill the "Address" field in Cred with an address or click the "Use my location" link, the coordinates are transferred to the "Latitude" and "Longitude" fields.

Question 1:
In addition to the "Address" field, can I also upload the fields with the coordinates and process them in my frontend?

I need an address and the coordinates in the front end of my website.

Question 2: How can I do this? Are there shortcodes for the coordinate fields?

Kind regards

#1623879

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

If I fill the "Address" field in Cred with an address or click the "Use my location" link, the coordinates are transferred to the "Latitude" and "Longitude" fields.
==>
Do you mean that when you click on "Use my location" link, you want to display the current location address instead of the "Latitude" and "Longitude" co-ordinates?

#1623955

Hello,
no, I mean that I want to upload and process not only the "Address" field, but also the "Latitude" and "Longitude" fields.

Kind regards

#1624275

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

I'm not sure why you want to upload/submit the "Latitude" and "Longitude" fields as addon field
because once you save the address field you can display the address text or "Latitude" and "Longitude" values using the Types shortcode.

For example:

[types field="address-field" format="FIELD_ADDRESS: FIELD_LATITUDE, FIELD_LONGITUDE"][/types]
#1624651

Hi, Thank You,
can I also display both - address text and coordinates?

Kind regards

#1625127

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

If you just want to display address:

[types field="address-field"][/types]

And if you want to display the coordinates, you can use the following shortcode:

[types field="address-field" format="FIELD_ADDRESS: FIELD_LATITUDE, FIELD_LONGITUDE"][/types]
#1625197

Hello and thank you very much!
Unfortunately this code doesn't work for me.
I have therefore changed it as follows:

[types field = "address"] [/ types]

to display the text address and:

[types field = "address" format = "field_latitude | field_longitude"]

to display the coordinates.

Another question on the topic:
How can I hide the "address" field if there is no text address?

Kind regards

#1625711

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

The shortcode I shared with my reply;
=> https://toolset.com/de/forums/topic/upload-of-address-and-coordinates-with-cred/#post-1625127

Obviously you need to change the field name to your original field name.

You can use the conditional shortcode to display the conditional content.

For example:

[wpv-conditional if="( '[types field="address"][/types]' ne '' )"]
[types field="address"][/types]
[/wpv-conditional]

The above conditional statement checks that if address field is not empty then display the address field value.

More info:
=> https://toolset.com/documentation/user-guides/views/conditional-html-output-in-views/using-shortcodes-in-conditions/

#1628505

Hi,
I am not sure that you understood my question.
I am concerned with the following problem: If you do not enter a text address in the "address" field or if you do not use the "Use my location" link, the following value is transferred to the "address" field:
{latitude, longitude}.
I would like the "address" field not to be displayed if {latitude, longitude} has been adopted there.

Thank you so much!

Kind regards

#1628513

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

I need more information here:
- Where you added the address field? On Toolset form - right? If yes:
- You have additional fields available with your form {latitude, longitude} to store the {latitude, longitude} values, correct? Do you have one field that stores the {latitude, longitude} or separate field for lat and lon?
- As I understand if you do not add anything to the address field it should remain hidden - correct? That means, you will have field available before the address field where user can input the {latitude, longitude} - correct?

#1628571
screen_18.05.2020.png

Hi,
please look here:
hidden link

Thank you so much!

Kind regards

#1628665

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

I understand now what you are saying but there is no such feature as when you use Lat,Lon the field is automatically updated by given Lat,lon.

And in that case, the lat,lon value added to the address field (which is adopted automatically) will be saved in the database with the address field.

#1628795

Hi,
I understood that. But can I not hide the display of the Fed "Adress" in the frontend with the application of the function "conditional display" if the field contains the content {Latitude, Longitude}?

Thank you so much!

Kind regards

#1628821

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

I can see you are talking about this form: hidden link

You are talking about the address field "Genaue Lage des Platzes".

The thing is that Toolset form conditional display works based on the other field content and based on that you can show hide the field. You can not check the fields own value. Having said that, lets say you have filed X and Y. if X filed have value 111 then and then you want to display the Y field. This is how the forms conditional display works.
=> https://toolset.com/documentation/user-guides/front-end-forms/cred-conditional-display-engine/

And until and unless the user will enter either address field text or lat-lon value to the address field "Genaue Lage des Platzes" we can not determine what user is going to enter before the user input anything.

Das Forum „Toolset Professioneller Support“ ist für neue Themen und Antworten geschlossen.