Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Label - This is the form label that will appear directly above this field
  2. Name - This is the form field name, which is hidden. If this field is passing information into a module, the module may require it to have a specific name.
  3. Description - This will be shown as a tooltip next to the option to explain it.
  4. Type - The type of field, either "Checkbox", "Radio", "Drop down", "Quantity", "Text", "Textarea", or "QuantityPassword".
  5. Client can Add - Check to allow clients to add the config option to a service order or addon.
  6. Client can Edit - Check to allow clients to edit the config option on existing services.

Options

The options that are displayed vary depending on the "Type" selected above.

...

On this screen, hovering over the options under the group will display a sort icon in the left most column. To sort, click and hold on the option you wish to move, and drag it up or down in the list, releasing it where you wish to place it.

Using Configurable Options in Welcome Emails

Configurable options can be used in welcome emails and are numerically indexed within the services.options array. As an example, the value for the first configurable option would be available by using the following tag:

Code Block
{services.options.0.value}

If you want to show all options, it's better to use a for loop. This will show the field label and the value, e.g.

License Key: 123-my-license-key
Notes: Here are some notes.
...

Code Block
{% for option in service.options %}
{option.option_label}: {option.value}
{% endfor %}


To determine what index your config option has, you can use the {% debug %} tag in your welcome email and observe the data. Do not leave the tag in your welcome email, it may contain sensitive data that should not be emailed to clients. Below is an example of the array using a config option label of "License Key", with a name of "license-key", and a value of "new-key-123-abcdefg-license". Indexes start at 0, so the first will have an index of 0, the second an index of 1, and so on.

Code Block
    [service] => stdClass Object
        (
            [id] => 3
            ....

            [options] => Array
                (
                    [0] => stdClass Object
                        (
                            [id] => 2
                            [service_id] => 3
                            [option_pricing_id] => 1
                            [qty] => 1
                            [value] => new-key-123-abcdefg-license
                            [encrypted] => 0
                            [option_value] => 
                            [option_value_name] => 
                            [option_id] => 1
                            [option_label] => License Key
                            [option_name] => license-key
                            [option_type] => textarea
                            [option_addable] => 0
                            [option_editable] => 0
                            [option_pricing_term] => 1
                            [option_pricing_period] => month
                            [option_pricing_price] => 0.0000
                            [option_pricing_price_renews] => 0.0000
                            [option_pricing_setup_fee] => 0.0000
                            [option_pricing_currency] => USD
                        )

                )


Overriding Module Row or Module Group with Configurable Options

Info
title5.4 feature

This feature was added in Blesta version 5.4.

Module Rows are typically associated with a server, and Module Groups are typically associated with a group of servers. For example, a shared hosting module like DirectAdmin allows you to create "Server Groups" and "Servers". A server group would be considered a Module Group, and a server would be considered a module row. These definitions may change from module to module, but whatever they are called within the module, they can be overridden.

Typically these are defined on a Package. For example, using the DirectAdmin module as an example, on the Package you can set a specific server or server group to provision new accounts from. These can be overridden with a configurable option. A common use-case for this is "Location". If servers are organized into groups, and those groups designate a location, you can allow the client to select their location on their own.


Attribute to OverrideName (This is the form field name set on the option)
Module Groupmodule_row_group
Module Rowmodule_row_id

The value of the field should match the ID for the group, or row, specifically. To determine the group or row ID, edit the group or row and observe the ID in the URL.

/admin/settings/company/modules/editgroup/5/1/ (In this case, the group ID is "1")

/admin/settings/company/modules/editrow/5/4/ (In this case, the row ID is "4")