formio.js
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
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)
Steps to Reproduce
- Got to http://formio.github.io/formio.js/app/builder
- Drag and Drop advanced -> phoneNumber component
- Click on Data tab -> Check the "Multiple Values" checkbox.
- Set the below value in Custom Default Value Example: value = ["(787) 787-7777","(676) 767-7677"];
- Save the changes.
- 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.
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 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 any plans/roadmap when you are going to fix this one?
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.