Documentation and tips for setting up Weight Tracker on your WordPress site.
More:
Weight Tracker Plugin / GitHub / YeKen.uk
The following shortcode is only available in the Pro version of the plugin.
This shortcode is an extension of [wt-form] and displays a form for custom custom fields only.
By default, all custom fields shall be displayed by this shortcode. To restrict which custom fields are shown, use the arguments "custom-field-groups" or "custom-field-slugs".
Below are example custom field forms:
Shortcode Arguments
The following arguments are the most popular for this shortcode:
Argument | Description | Options | Example |
class | Allows you to specify an additional CSS class on the element. | Text | [wt-custom-fields-form class='additional-css-class'] |
custom-field-groups | Specify one or more custom field group slugs. Specifying groups will ensure that only custom fields within those groups are displayed on the control. | An individual slug or multiple slugs comma delimited. | [wt-custom-fields-form custom-field-groups='measurements'] [wt-custom-fields-form custom-field-groups='measurements,fitness-test'] |
custom-field-slugs | Specify one or more custom field slugs. Specifying slugs will ensure only the fields specified are displayed on the control. | An individual slug or multiple slugs comma delimited. | [wt-custom-fields-form custom-field-slugs='waist'] [wt-custom-fields-form custom-field-slugs='waist,bicep,distance-run'] |
force-todays-date | If set to true, date picker will be hidden. Instead, entries will be added for today's date. | True or false (default) | [wt-custom-fields-form force-todays-date='true'] |
hide-titles | If set to true, the title (e.g. Target Weight) above the form will be hidden. | True or false (default) | [wt-custom-fields-form hide-titles='true'] |
load-placeholders | If set to true, the weight and custom field values will be added as placeholders form form fields. | True (default) or false | [wt-custom-fields-form load-placeholders='true'] |
redirect-url | If specified, a URL that the user should be redirected to after completing the form. | A URL within the current domain. | [wt-custom-fields-form redirect-url='https://yoursite.com/thank-you-page'] |
title | The title to be displayed at the top of the form | Text. By default, it will try to be automatically determined based on the type of form | [wt-custom-fields-form title='Enter your cups of water for today'] |
user-id | By default, the shortcode will save data against the current user. You can specify this argument to save the form data against another user ID. | Numeric | [wt-custom-fields-form user-id="1"] |