Skip to content

No option to start with blank option for prefix and suffix in checkout. #7241

Closed
@spyrule

Description

@spyrule

Fairly straight forward,

If you configure both/either Prefix and Suffix as Optional, and then populate the configuration list, there is no option to allow a blank option (if they choose not to select an option, it defaults to the first option in the list). Even if you precursor the list with a space and ";" it defaults to the first option after the first semi-colon.

Preconditions

  1. Magento 2.1.2 CE
  2. php 7

Steps to reproduce

  1. Go to Admin panel > Stores > Configuration > Customers > Customer Configuration
  2. Change "Show Prefix" and/or "Show Suffix" to "Optional"
  3. Populate "Prefix Dropdown Options" with : " ;Ms;Miss;Mrs;Mr;Dr;Atty;Hon;Prof;Pres;VP;MA"
  4. Populate "Suffix Dropdown Options" with : " ;Jr;Sr;Ph.D.;M.D.;R.N.;Ret."
  5. Click Save.
  6. Switch to the front-end, and add something to your cart.
  7. Go to the checkout page.
  8. You'll notice that Prefix and Suffix load with the lists, however it skips the starting "blank" option, and immediately selects "Ms" for Prefix, and "Jr" for Suffix.

Expected result

  1. If the admin selects Optional, the First options should ALWAYS be a blank (even if the admin doesn't configure a blank in the options). Id actually go as far as saying, the admin shouldn't NEED to configure a blank in the options if "Optional" is selected.

Actual result

  1. Instead of showing the first option if it is a blank, it selects the first actual option in the list, regardless of how you configure it (I understand, that its likely stripping blanks to prevent errors).

prefix-suffix-config1

prefix-suffix-noblankbydefault

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CustomerFixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasebug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions