Calling third-party services to fill your form

Posted by:

Within any formula you can also call a third-party service, you can use this formula to fill a field (like a text box or hidden field) or you could use it to do other operations for example, you could call a third-party service to get the status of a user and then use that info to calculate a price or to hide a field.

To call a third-party service in your formulas do the following

1.- Open the formula editor in the setting that you want to fill, in the example below I want to use a formula to fill a field so I will use the “Default text” setting (for more info about how to create formulas check this tutorial):

2.- Click on “Add Field”

3.- Click on “Remote Call”

4.- Configure the Remote call. In this step, you can define the URL that you want to use, and the parameters to send to the third-party service

5.- Click apply

6.- That’s it! now your formula is going to call the configured third-party service

If you just want to fill a field with the result of the third-party service this formula is enough, but you can also do operations against this remote call (just like you would do it with any other field). So for example, in the screenshot below, I am retrieving a value from the third-party service and then I am multiplying it by the quantity field.

Editing a remote call formula

To edit a remote call all you have to do is double-click on it.

Creating interactive forms with third-party services

You can also use values from other fields to form your remote calls, for example in the remote call below I am using the value of the field “Product Id”. All I need to do is click on the tag icon to add a field within a parameter

When you add a field with a remote call every time this field changes the field that is using it in the remote call will be refreshed as well.

0

Using WP shortcodes in your form

Posted by:

Within any formula you can also get the value from a shortcode, you can use this formula to fill a field (like a text box or hidden field) or you could use it to do other operations for example, you could use a shortcode to get the status of a user and then use that info to calculate a price or to hide a field.

To use shortcodes in your formulas do the following

1.- Open the formula editor in the setting that you want to fill, in the example below I want to use a formula to fill a field so I will use the “Default text” setting (for more info about how to create formulas check this tutorial):

2.- Click on “Add Field”

3.- Click on “ShortCode”

4.- Configure the shortcode. In this step, you can define the name, content, and attributes of the shortcode. You can also see a preview of how the shortcode looks like.

5.- Click apply

6.- That’s it! now your formula has a shortcode in it.

If all you want to do is fill a field with the content of a shortcode this formula is enough but you might want to do something more complex. For example, let’s say that your shortcode returns a product price and you would like to multiply it by a quantity field. If so you could use a formula like this:

The formula above would retrieve the value of the shortcode and will multiply it by the quantity field.

Editing a Shortcode formula

To edit a shortcode all you have to do is double-click on it.

Creating interactive forms with shortcodes

You can also use values from other fields to form your shortcode, for example in the shortcode below I am using the value of the field “Product Id” to create my shortcode. All I need to do is click on the tag icon to add a field within a shortcode attribute or content.

When you add a field with a shortcode every time this field changes the shortcode will be refreshed as well.

0