Mity Docs Mity Docs for Mity Digital
Variable Number Fieldtype Documentation

Configuration

After installation, you're all set to go.

When you add the fieldtype to one of your Forms blueprints, you will configure that particular fieldtype instance. There are no global fieldtype configuration options for all fieldtypes.

This fieldtype is designed to work with the Forms blueprints only. Using it on a non-Form Blueprint will not harm your setup, but also it won't allow for any functionality.

Options

Required. This is the list of base numbers a user can select from.

You can optionally select a number to be the default value.

Allow custom number

When enabled, allows the user to enter a custom value, and adds additional configuration options.

When disabled, the user must select from one of your Options.

Custom number display

Select Direct input for custom values to always show an input field that the user can type in. When doing so, this overrides any selected value.

Select Show only if "custom" is selected to only show the custom input field if the user selects the "custom" option. When selected, this will also add a "custom" option to your Options automatically.

Minimum

Required when "Allow custom number" is enabled. The minimum number allowed.

Maximum

Required when "Allow custom number" is enabled. The maximum number allowed.

Placeholder

The placeholder text for the custom input field. If left blank, the addon's language default will be used.

Format

Allows you to choose how numbers will be presented in your form. You can choose from:

  • Currency

  • Decimal

  • Integer

Currency

Only required when the Format is set to "Currency".

A valid currency code that is supported by your platform.

Decimals

Only required when the Format is set to "Decimal".

The number of decimal places to use.

Layout

Allows you to choose how to present the variable number fieldtype. You can choose from:

  • Button

  • Radio buttons

  • Select

  • Custom...

"Custom..." is only needed when you want to write your own totally custom layout - when you publish the addon's layouts, these will be loaded when selecting one of Button, Radio or Select, even though they now exist within your project, not the addon.

Custom Layout

Only required when Layout is set to "Custom...".

The name (from your views folder) to your custom layout.

Allow URL overrides

When disabled, your earlier configuration is used.

When enabled, you can provide options via a query parameter. One use case for this is to allow different values for different users if fed in from an email campaign.

To use this, the addon will look for a parameter of your field handle prefixed with vn_, and will take a comma-delimited string of options to use. If your field handle is amount, the parameter to use would be vn_amount.

For example:
https://mydomain/donate?vn_amount=10,20,30

This will override the Options, and use the values of 10, 20 and 30, and have them displayed based on your Format configuration.

The number of Options provided does not need to match the number of Options configured - you could have 3 Options configured, and only pass 2 via a URL. Or pass 5 values. Whatever works for you.