-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #302 from infinum/form/addons
updating addon docs
- Loading branch information
Showing
19 changed files
with
213 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
id: addon-boilerplate | ||
title: Add-on boilerplate | ||
--- | ||
|
||
*Coming soon* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ id: intro | |
title: Intro | ||
--- | ||
|
||
**Coming soon** | ||
*Coming soon* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
id: requirements | ||
title: Requirements | ||
--- | ||
|
||
*Coming soon* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
id: utils-library | ||
title: Utils library | ||
--- | ||
|
||
*Coming soon* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
id: intro | ||
title: Intro | ||
--- | ||
|
||
**Free plugins:** | ||
* *Coming soon* | ||
|
||
|
||
## How to download? | ||
|
||
All free plugins are publicly available and can be downloaded from our GitHub account. How to install them please follow [this tutorial](/forms/basics). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
id: intro | ||
title: Intro | ||
--- | ||
|
||
Starting from version 3 of Eightshift Forms, custom add-on plugins are now supported, which can be used along with the main plugin to enhance its functionality. | ||
|
||
We will update this page's list of [free](free/intro) and [premium](premium/intro) plugins available for Eightshift Forms. | ||
|
||
### Want to create your own add-on plugin? | ||
|
||
If you want to add your add-on plugin to our list, you can submit an [issue here](https://github.com/infinum/eightshift-forms/issues). | ||
|
||
Visit this [link](create/intro) for a tutorial and guidelines on creating a plugin for Eightshift Forms. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
id: blocks | ||
title: Blocks | ||
--- | ||
|
||
## Computed fields results block | ||
|
||
Once you create your valid program and populate output variables, you should provide a [thank you](/forms/features/success-redirect) page in the `General settings`. | ||
|
||
You can add a new `computed fields results` block on the _Thank you_ page and provide condition options. | ||
|
||
Under `variable name`, you can provide the name of any variable defined in the `output variables`. | ||
|
||
Under `variable value`, you can define the value of the selected variable. | ||
|
||
When the results block is used, you can `show` any block or multiple blocks when the `computed fields program` returns a value for the selected variable. | ||
|
||
![Computed Fields screen](/img/forms/addon-computed-fields-results.webp) | ||
|
||
:::note | ||
Computed fields program result is passed to the thank you page using the `es-data` GET parameter. | ||
The passed value is encrypted and can be decrypted using the `esFormsDecryptor` function. | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
id: data-flow | ||
title: Data flow | ||
--- | ||
|
||
Here's how data flow in the Computed fields add-on works: | ||
|
||
1. **User input** - User fills in and submits the form. | ||
2. **Computed Fields** - Computed Fields add-on takes the user input and processes it using the defined program. | ||
3. **Output** - Result is returned to JavaScript through the custom key in the Forms API response data. | ||
4. **Frontend** - JavaScript takes the result and redirects the user to the _Thank you_ page. | ||
5. **Thank you page** - A block displays the result to the user on the Thank you page. | ||
6. **Computed Fields Results block** - Computed Fields Results block takes the result using the `GET` variable `es-data` and displays it to the user if the conditions are met. | ||
|
||
:::note | ||
Multiple Computed Fields Results blocks can be used on a _Thank you_ page, but only one variable name can be used per block. | ||
::: |
16 changes: 16 additions & 0 deletions
16
website/forms/addons/premium/computed-fields/how-to-use.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
id: how-to-use | ||
title: How to use? | ||
--- | ||
|
||
To use Computed Fields, you must: | ||
|
||
1. Install and activate the add-on plugin. | ||
2. Enable Computed fields in Global settings. | ||
3. Create a form using Eightshift forms. (either from scratch or an integration) | ||
4. Enable the add-on feature in the Form settings. | ||
5. Enter the _Computed fields_ program. | ||
6. Populate the _Output variables_ fields. | ||
7. Add a _Computed Fields Results_ block on the _Thank you_ page. | ||
|
||
![Computed Fields screen](/img/forms/addon-computed-fields.webp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
id: settings | ||
title: Settings | ||
--- | ||
|
||
## Computed fields setting | ||
|
||
Here you can input your FCL program. Check the _Computed fields intro_ chapter for the list of supported features. | ||
|
||
_Available field names_ show all the form fields whose outputs are available as variables that can be used in an FCL program. | ||
|
||
For example, if you have a field named `email`, you can use `$email` to get that field's value. | ||
|
||
:::caution | ||
If a field name contains special characters or spaces, use the `camelCased` version of the name for the variable. For example, `my-field` becomes `$myField`. | ||
::: | ||
|
||
:::note | ||
The code editor supports syntax highlighting, undos and indenting with tabs. | ||
::: | ||
|
||
![Computed Fields settings 1 screen](/img/forms/addon-computed-fields-settings1.webp) | ||
|
||
## Output variables setting | ||
|
||
The variables sent as output data of an FCL program need to be specified manually. There is no limit for number of variables that can be output. | ||
|
||
:::caution | ||
Specify one variable per line and prefix each with `$`. | ||
::: | ||
|
||
![Computed Fields settings 2 screen](/img/forms/addon-computed-fields-settings2.webp) | ||
|
||
## Fake fields setting | ||
|
||
_Fake fields_ allow you to test an FCL program by providing test input data in JSON format. They will not be used on any user-facing forms. | ||
|
||
:::note | ||
The code editor supports syntax highlighting, undos and indenting with tabs. | ||
::: | ||
|
||
![Computed Fields settings 3 screen](/img/forms/addon-computed-fields-settings3.webp) | ||
|
||
## Test your program | ||
|
||
In order to test an FCL program without having to build a form follow these steps: | ||
|
||
* Add the FCL program in the _Computed fields_ field. | ||
* Populate _Output variables._ | ||
* Add test data into _Fake fields._ | ||
* Save the settings | ||
* Click the _Test Computed_ button and check the _Output log._ | ||
|
||
|
||
![Computed Fields settings 4 screen](/img/forms/addon-computed-fields-settings4.webp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
id: intro | ||
title: Intro | ||
--- | ||
|
||
**Premium plugins:** | ||
* [Computed fields](/forms/addons/premium/computed-fields/intro) | ||
|
||
## How to purchase? | ||
|
||
Premium plugins are not included with Eightshift Forms and have to be purchased separately. For more info, [drop us an e-mail](mailto:support.eightshift-forms@infinum.com). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.