Skip Navigation

[Resolved] Inserting form fields into API's

This support ticket is created 6 years, 5 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 7 replies, has 2 voices.

Last updated by Shane 6 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#1085570

I have an API that requires two values be entered into it in order for it to show information. I have the values captured in Toolset. Can i transpose those values into the API.

#1085776

Shane
Supporter

Languages: English (English )

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

Hi Matthew,

Thank you for contacting our support forum.

Do you mean that you have the values stored in a custom field on the backend and want to retrieve it from there ? Or is it that you want to retrieve the value while the user is entering it using the Toolset forms plugin.

Please let me know.

Thanks,
Shane

#1085780

the values are stored on the backend and i need to pass them to the API to present a sonar chart. and darksky weather values

#1085785

Shane
Supporter

Languages: English (English )

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

Hi Matthew,

If thats the case then this is mainly wordpress you will be handling.

You can use the function below to get the field value from the database
https://developer.wordpress.org/reference/functions/get_post_meta/

Thanks,
Shane

#1085786

you guys don't do custom coding to help out an over worked developer

#1085787

Shane
Supporter

Languages: English (English )

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

Hi Matthew,

Custom coding is out of our forum support scope.

We can let you know how to retrieve the values from the database so you can manipulate it from there.

To get this correct you only need to get the value from the database correct?

Thanks,
Shane

#1085789

this is the javascript for the api
see the line where is says latlng those two values are stored in toolset .... I need to pull them into the API
// The Google Map Engine options
var gibilterra = new google.maps.LatLng(36.140751,-5.353585);
var gMapNauticalOptions = {
zoom: 14,
center: gibilterra,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var gMapNautical2 = new google.maps.Map(document.getElementById("sonar-map-container"), gMapNauticalOptions);
//Navionics SonarChart
var navionics_sonarchart_layer = new JNC.Google.NavionicsOverlay({
navKey: "****",
chartType: JNC.Google.NavionicsOverlay.CHARTS.SONAR
});
gMapNautical2.overlayMapTypes.insertAt(0, navionics_sonarchart_layer);

#1085824

Shane
Supporter

Languages: English (English )

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

Hi Matthew,

Thank you for sharing the code. In this case since its JS, what you're going to have to do is to use our types shortcode to print the values on the page.

Then get the stored values from the page to plug into your js code.

Thanks,
Shane