Get default value and placeholder of the ACF field in the WordPress theme

When you build the form using ACF (Advanced Custom Field plugin) you’d probably want to use ACF field properties you created in the ACF admin page like this:
Advanced Custom Fields default value and placeholder

Honestly I tried to Google solution but haven’t found no suitable ACF helper function. If you have more elegant solution please write me some comment.

So I decided to make my own helper my solution is to create a simple function in the functions.php of your theme like this:

Simple as this.

In your theme you can add form fields like this:

Of course we can simplify SQL and make 1 query instead of 2 and use $wpdb->wp_postmeta instead of hardcoded table name but I leave it up to you 🙂

Enjoy and put some comments if you have something to add.