From 11a8b6e7a673bca4b03a3c555097be9a6bda333b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ru=C5=BEevi=C4=87?= Date: Thu, 14 Mar 2024 16:24:06 +0100 Subject: [PATCH] updating forms (#314) --- website/forms/php/shortcodes.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/website/forms/php/shortcodes.md b/website/forms/php/shortcodes.md index 98b14fe9a..63ba3fcdd 100644 --- a/website/forms/php/shortcodes.md +++ b/website/forms/php/shortcodes.md @@ -11,6 +11,14 @@ Shortcodes are small pieces of code that allow adding forms to the site in place This shortcode allows adding links within text labels, e.g. if you need to add a privacy policy link to a form checkbox label. +**Available usage:** +* Form field label (e.g. checkbox label, radio label, etc.) + +**Available attributes:** +* url - (string) (required) The URL of the link. +* label - (string) (required) The label of the link. + +**Example usage:** ```php [esFormsLink url="https://eightshift.com" label="Eightshift" /] ``` @@ -19,6 +27,30 @@ This shortcode allows adding links within text labels, e.g. if you need to add a The `esFormsROIP` (_Result output item part_) shortcode allows showing certain content inline, based on the user input. The content is shown if the provided `name` matches the fields defined within filters. +**Available usage:** +* Result output custom post type + +**Available attributes:** +* name - (string) (required) The name of the key to check. + +**Example usage:** ```php [esFormsROIP name=""]Default content[/esFormsROIP] ``` + +## esFormsRangeCurrent + +The `esFormsRangeCurrent` shortcode allows showing the current value of the range input. + +**Available usage:** +* Form field range label. + +**Available attributes:** +* value - (string) (required) The initial value of the range. +* prefix - (string) (optional) The prefix of the range value. +* suffix - (string) (optional) The suffix of the range value. + +**Example usage:** +```php +[esFormsRangeCurrent value="" prefix="" suffix="" /] +```