formio: [BUG] Textfield and TextArea fields placeholder is not customizable

Environment

Please provide as many details as you can:

  • Hosting type
    • [] Local deployment
      • Version:
  • Formio.js version: 4.13.10
  • Frontend framework: None
  • Browser: Chrome
  • Browser version: 104.0.5112.101

Steps to Reproduce

  1. Edit textfield component editForm
  2. Modify label placeholder to “Hello” for example

Expected behavior

in Form builder when you drag textfiled component, you should see “Hello” as a placeholder of label input

Observed behavior

textfield and textarea components display respectively “Text Field” and “Text Area” as default values not even as placeholders

Example

Screen Shot 2022-08-24 at 18 00 11

same issue for checkbox component too (and probably the rest of components)

Screen Shot 2022-08-24 at 18 26 04

Here is the code snippet for customizing the textfiled component editForm:


            Formio.Components.components.textarea.editForm = function () {
                return {
                    components: [
                        {
                            type: 'tabs', key: 'tabs',
                            components: [
                                {
                                    key: 'display', label: 'Weergave', weight: 0,
                                    components: [
                                        {type: 'textfield', key: "label", label: 'Label', placeholder: 'Label'},
                                        {type: 'input', key: 'placeholder', label: 'Placeholder'},
                                        descriptionComponent,
                                    ],
                                },
                                {
                                    key: 'validation', label: 'Validatie', weight: 10,
                                    components: [
                                        {type: 'checkbox', key: 'validate.required', label: 'Vereist'},
                                    ]
                                }
                            ],
                        },
                    ],
                };
            };

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 30 (1 by maintainers)

Most upvoted comments

Can we communicate in slack. I have few points to discuss??

Join me on discord @akhossan#3635