Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter degar007

    (@degar007)

    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

    (@degar007)

    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}

    Never gotten “Own Db Field” to work either. Raised this with the plugin author ages ago. ??

    Thread Starter degar007

    (@degar007)

    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.

    (@stefan-m-1)

    [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.