Title: Own Db Field
Last modified: August 21, 2016

---

# Own Db Field

 *  [degar007](https://wordpress.org/support/users/degar007/)
 * (@degar007)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/own-db-field/)
 * In the premium version its possible to create your own db fiels, so i did.
 * They all write nicely to the database, the question that I have is how to use
   them, as they do not show up in any dropdown, or form creation.
 * does anyone know how use them ?
 * [https://wordpress.org/plugins/custom-tables/](https://wordpress.org/plugins/custom-tables/)

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

 *  Thread Starter [degar007](https://wordpress.org/support/users/degar007/)
 * (@degar007)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/own-db-field/#post-4730600)
 * After long testing I did come up with a sollution
 * lets say you wish to create a user which gets the currently logged in user and
   writes it to the database table that you created…
 * create table user—varchar32 in the database that you are currently using, then
   just add this to your (form) entry setup:
 *     ```
       <input class="wct-formchar32" type="text" name="wctf_user" value="[wctphp]
       echo echo $current_user->user_login;;
       [/wctphp]" maxsize="32"/>
       Date:
       {date}
       ```
   
 * The date is set up as a date, in the tables the user is set up as a normal varchar32
   field. With this method, you do not have to create “Own Db Field” (as I have 
   never gotten them to work)
 *  Thread Starter [degar007](https://wordpress.org/support/users/degar007/)
 * (@degar007)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/own-db-field/#post-4730607)
 * sorry forgot the
 * > $current_user = wp_get_current_user();
 * so it should be
 *     ```
       <input class="wct-formchar32" type="text" name="wctf_user" value="[wctphp]
       $current_user = wp_get_current_user();
       echo echo $current_user->user_login;
       [/wctphp]" maxsize="32"/>
       Date:
       {date}
       ```
   
 *  [ccsnjf](https://wordpress.org/support/users/ccsnjf/)
 * (@ccsnjf)
 * [12 years ago](https://wordpress.org/support/topic/own-db-field/#post-4730648)
 * Never gotten “Own Db Field” to work either. Raised this with the plugin author
   ages ago. 🙁
 *  Thread Starter [degar007](https://wordpress.org/support/users/degar007/)
 * (@degar007)
 * [12 years ago](https://wordpress.org/support/topic/own-db-field/#post-4730650)
 * Yea, neither have I, and I didn’t really feel up to it going through his code…
   that’s why I came up with this alternative (which actually works well).
 * I am actually working with this plug-in for a rather large inventory system, 
   and know it pretty well by now. If you have any questions, and I know the answer,
   I will answer.
 * All the best.
 *  Plugin Author [Stefan M.](https://wordpress.org/support/users/stefan-m-1/)
 * (@stefan-m-1)
 * [12 years ago](https://wordpress.org/support/topic/own-db-field/#post-4730656)
 * `[wctphp]echo 'USERNAME';[/wctphp]`
 * Thats all you need.
 * USERNAME will automatically be replaced with the username of the logged in user.
 * Regards

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

The topic ‘Own Db Field’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-tables.svg)
 * [custom tables](https://wordpress.org/plugins/custom-tables/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-tables/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-tables/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-tables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-tables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-tables/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Stefan M.](https://wordpress.org/support/users/stefan-m-1/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/own-db-field/#post-4730656)
 * Status: not resolved