formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

[BUG] Custom default value is not getting displayed for Advanced -> phone number component with multiple value selected in FormBuilder Preview or FormRenderer

Open naga7229 opened this issue 4 years ago • 3 comments

Environment

Please provide as many details as you can: Form.io Advanced -> PhoneNumber component

  • Hosting type
    • [x] Form.io
    • [ ] Local deployment
      • Version:
  • Formio.js version:4.10.5
  • Frontend framework: yes
  • Browser: Chrome/Firefox
  • Browser version: Chrome Version 85.0.4183.83 (Official Build) (64-bit)/Firefox 80.0.1 (64-bit) FormIO_PhoneNumber_Issue

Steps to Reproduce

  1. Got to http://formio.github.io/formio.js/app/builder
  2. Drag and Drop advanced -> phoneNumber component
  3. Click on Data tab -> Check the "Multiple Values" checkbox.
  4. Set the below value in Custom Default Value Example: value = ["(787) 787-7777","(676) 767-7677"];
  5. Save the changes.
  6. Go to Form Renderer section and see the Custom default value is not getting displayed.

Note: If I set the same value in Calculated Value it is getting displayed

Expected behavior

Custom default value is should get displayed for Advanced -> phone number component with multiple value selected in FormBuilder Preview or FormRenderer.

Observed behavior

It is not getting displayed the custom default value. FormIO_PhoneNumber_Issue

Example

If possible, please provide a screenshot, live example (via JSFiddle or similar), and/or example code to help demonstrate the issue.

For code or form JSON, please enclose in a code block:

Example Form:
{
    "display": "form",
    "settings": {
        "pdf": {
            "id": "1ec0f8ee-6685-5d98-a847-26f67b67d6f0",
            "src": "https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0"
        }
    },
    "components": [
        {
            "label": "Phone Number",
            "tableView": true,
            "multiple": true,
            "customDefaultValue": "value = [\"(787) 787-7777\",\"(676) 767-7677\"];",
            "validate": {
                "multiple": true
            },
            "key": "phoneNumber",
            "type": "phoneNumber",
            "input": true
        },
        {
            "type": "button",
            "label": "Submit",
            "key": "submit",
            "disableOnInvalid": true,
            "input": true,
            "tableView": false
        }
    ]
}

naga7229 avatar Sep 09 '20 13:09 naga7229

@naga7229 Thanks for reaching out. We are able to replicate and have created a ticket (FJS-1214) and have added it to our backlog. We welcome a pull request or have a process to expedite if you are interested.

We will let you know once this issue has been resolved.

wag110894 avatar Sep 14 '20 16:09 wag110894

@wag110894 any plans/roadmap when you are going to fix this one?

teichsta avatar Mar 27 '23 07:03 teichsta

As of now, this item remains on our backlog and is not scheduled for development by our team. However, we encourage community contributions and would gladly review any pull requests addressing this issue. Your input is appreciated in moving this forward.

lane-formio avatar Feb 21 '24 14:02 lane-formio