Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-1880

Allow a default option to be selected for configurable options

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.0
    • Fix Version/s: Sponsored, 4.6.0-b1
    • Component/s: Staff Interface
    • Labels:
      None

      Description

      1. Update adding/editing package options:
      2. Add a Default column at the end of the table for every type
        • Quantity: Text input to set an integer value that is validated to be between min/max at the appropriate step
        • Checkbox: Checkbox to set whether the checkbox field is checked by default
        • Radio: Radio to set which radio option is selected by default
        • Select: Radio to set which drop-down option is selected by default
        • Text/Textarea/Password will not support a default value at this time

      In the backend, a new `default` field (after `value`) would be added to `package_option_values`, default NULL 0, int(10), denoting whether this record is the default value (0 or 1). In the case of quantity values, the default would be the actual quantity value (e.g. 25)


      When creating or editing configurable options, add a radio field at the beginning of each option fields of the type dropdown and radio that allow the item to be selected by default.

      Currently the default option becomes the first option, but this isn't always ideal.

        Issue Links

          Activity

          Hide
          tyson Tyson Phillips (Inactive) added a comment -

          Why is this limited to Drop-down and Radio options? Quantity and checkbox options can also be supported by allowing for a set of default values to be set. Checkbox options could have multiple values set while all the others would only allow for one default value to be set.

          Show
          tyson Tyson Phillips (Inactive) added a comment - Why is this limited to Drop-down and Radio options? Quantity and checkbox options can also be supported by allowing for a set of default values to be set. Checkbox options could have multiple values set while all the others would only allow for one default value to be set.
          Hide
          admin Paul Phillips added a comment -

          That's a good point.

          Checkbox and Quantity have only a single option.

          What if for Checkbox we add another column to the end of the option, after Name and Value, called "Default" which contains a checkbox. If it's checked, then the checkbox will be checked by default. If not, then it won't.

          For quantity, we have Name, Min, Max, and Step. To the right of Step would could have a field called "Default" similar to Checkbox where the default value could be entered in a text input field similar to the other fields.

          Show
          admin Paul Phillips added a comment - That's a good point. Checkbox and Quantity have only a single option. What if for Checkbox we add another column to the end of the option, after Name and Value, called "Default" which contains a checkbox. If it's checked, then the checkbox will be checked by default. If not, then it won't. For quantity, we have Name, Min, Max, and Step. To the right of Step would could have a field called "Default" similar to Checkbox where the default value could be entered in a text input field similar to the other fields.
          Hide
          tyson Tyson Phillips (Inactive) added a comment -

          Why not add a _Default _ column at the end of the table for every type?

          • Quantity: Text input to set an integer value that is validated to be between min/max
          • Checkbox: Checkbox to set whether the checkbox field is checked by default
          • Radio: Radio to set which radio option is selected by default
          • Select: Radio to set which drop-down option is selected by default

          In the backend, a new field would be added to `package_option_values`, default NULL, int(10), denoting whether this record is the default value. In the case of quantity values, the default would be the actual quantity value

          Show
          tyson Tyson Phillips (Inactive) added a comment - Why not add a _Default _ column at the end of the table for every type? Quantity: Text input to set an integer value that is validated to be between min/max Checkbox: Checkbox to set whether the checkbox field is checked by default Radio: Radio to set which radio option is selected by default Select: Radio to set which drop-down option is selected by default In the backend, a new field would be added to `package_option_values`, default NULL, int(10), denoting whether this record is the default value. In the case of quantity values, the default would be the actual quantity value

            People

            • Assignee:
              tyson Tyson Phillips (Inactive)
              Reporter:
              admin Paul Phillips
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                28/May/19

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours, 8 minutes
                1d 2h 8m

                  Agile