We regularly get the request if it's possible to use the basic data of logged in WordPress users inside Tripetto forms, for example to show the name of the user.
This is indeed possible by saving that user information in a way that the hidden field block of Tripetto can access that data. To help you with that we developed a small WordPress addon that makes the user data accessible. In this article we will help you to set this up.
At own risk
This addon is just to help you access the data. It's not part of the Tripetto platform/plugin.
Follow these steps to install the addon as a plugin:
- Download this ZIP file containing the addon;
- Optional: By default the addon makes all user data accessible. If you only want to access particular user data, you can modify the plugin so only the desired fields are used in the plugin;
- Install the addon to your WordPress Admin:
Upload PluginSelect the downloaded ZIP fileClick
Install NowAfter installation click
Follow these steps to setup the shortcodes:
- Make sure the
modeof your Tripetto form shortcode is set to
inline, like this:
mode='inline'. More information about the shortcode can be found in this help article;
- Add the shortcode of the addon
[tripetto-wp-user-data]to the desired post/page. The position of this shortcode doesn't matter.
Receive user data with hidden field(s)
Now your Tripetto form can read the user data variables using the hidden field block. More information about the hidden field block can be found in this help article.
To read the user data, setup the hidden field as follows:
- Name - The name you want to give the hidden field;
- Type of field - Select
- Name of variable - Enter the desired variable out of this list:
Possibilities of hidden field block
You can also use the values of hidden fields in your form, for example for piping logic, or branch logic. More information about the hidden field can be found in this help article.