Title: Retrieve data from external source
Last modified: November 19, 2021

---

# Retrieve data from external source

 *  Resolved [giandani](https://wordpress.org/support/users/giandani/)
 * (@giandani)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/retrive-data-from-external-source/)
 * Hi,
    I’ve a request that could really keep me out of a lot of maintenance.
 * I’ve a form about some courses registration where the user can select a course,
   fill in all the required fields, see the course amount that has been calculated
   and then submit.
 * The issue is that the courses may vary and also their costs.
    I wanted to understand
   if there’s a way to link the Select to some sort of an external database of any
   kind in order to retrive the updated list of courses instead of updating manually
   the form each and every time. Note that based on the course type (Select 1) there
   could be further Selects for Course Level and Ages that may or may not apply.(
   i.e. Kids Course – Age 9-11 – Basic Level ; Adult Course, Advanced Level).
 * Something like a GET would be nice 🙂
 * Giandani
    -  This topic was modified 4 years, 6 months ago by [giandani](https://wordpress.org/support/users/giandani/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Support [Dimitris – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support6/)
 * (@wpmudev-support6)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/retrive-data-from-external-source/#post-15088482)
 * Hello [@giandani](https://wordpress.org/support/users/giandani/)
 * Query parameters can only be used to pre-populate the field value, for example:
 * > [View post on imgur.com](https://imgur.com/1gPMJt1)
 * 
    but for dynamically getting all options I’m afraid that you will have to custom
   code it using the provided API: [https://wpmudev.com/docs/api-plugin-development/forminator-api-docs/](https://wpmudev.com/docs/api-plugin-development/forminator-api-docs/)
 * Thank you,
    Dimitris
 *  Thread Starter [giandani](https://wordpress.org/support/users/giandani/)
 * (@giandani)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/retrive-data-from-external-source/#post-15088693)
 * Thanks Dimitris,
    but pre-populate will not work for me, I need something a bit
   more complex like a query on post type and terms to fill Select and on their 
   relative post data to fill Hidden fields for Calculation.
 * About the custom coding, that won’t be feasible for me: haven’t got the skills
   to code in php, nor the time to learn (have to deploy next week).
 * Thanks anyway,
    Giandani
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/retrive-data-from-external-source/#post-15089699)
 * Hi [@giandani](https://wordpress.org/support/users/giandani/)
 * Thank you for the update.
 * I am afraid the only option would be writing a custom code to update the field
   using the API.
 * Forminator does have some hooks, this is an example, to update a hidden field
   and replace a fixed value with a Custom field value:
 *     ```
       <?php 
   
       add_filter( 'forminator_field_hidden_field_value', function( $value ){
   
       	if( $value === 'custom_email' ){
       		$post_id = get_queried_object_id();
       		$custom_email = get_post_meta( $post_id, 'custom_email', true );
       		$value = $custom_email;
       	}
       	return $value;
       } );
       ```
   
 * But either of those available hooks will require PHP code since you would need
   to fetch the database.
 * Best Regards
    Patrick Freitas
 *  Thread Starter [giandani](https://wordpress.org/support/users/giandani/)
 * (@giandani)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/retrive-data-from-external-source/#post-15089710)
 * Many thanks for the tip.
    I think for the moment I’ll release as-is with manual
   update, and well… I’ll learn some php for future improvements 🙂
 * Best,
    Giandani
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/retrive-data-from-external-source/#post-15089751)
 * Hi [@giandani](https://wordpress.org/support/users/giandani/)
 * You are welcome,
 * I am marking this as resolved, but feel free to ping us if you have any additional
   questions.
 * Best Regards
    Patrick Freitas

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Retrieve data from external source’ is closed to new replies.

 * ![](https://ps.w.org/forminator/assets/icon-256x256.gif?rev=3443182)
 * [Forminator Forms – Contact Form, Payment Form & Custom Form Builder](https://wordpress.org/plugins/forminator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forminator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forminator/)
 * [Active Topics](https://wordpress.org/support/plugin/forminator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forminator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forminator/reviews/)

## Tags

 * [automation](https://wordpress.org/support/topic-tag/automation/)
 * [external data](https://wordpress.org/support/topic-tag/external-data/)
 * [select field](https://wordpress.org/support/topic-tag/select-field/)

 * 5 replies
 * 3 participants
 * Last reply from: [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/retrive-data-from-external-source/#post-15089751)
 * Status: resolved