Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid control type with replaced or custom fields (in combination with paging) #1006

Closed
sxndy1 opened this issue Nov 22, 2019 · 5 comments
Closed
Labels
bug needs-reproduction Issue needs full code example to reproduce

Comments

@sxndy1
Copy link

sxndy1 commented Nov 22, 2019

Description:

Javascirpt-Error:
Uncaught Error: Invalid control type. (Type: radio-group-4783, Subtype: undefined). Please ensure you have registered it, and imported it correctly.

FormBuilder-Options:

replaceFields: [
{
   label: "Kontrollkästchen-Gruppe",
   type: "checkbox-group",
   values: [
      // vordefinierte Optionen mit Beschreibung
      {
      label: "Beschriftung",
      value: "Wert bei Auswertung (z.B.: Ja/Nein)"
      },
      {
      label: "Beschriftung",
      value: "Wert bei Auswertung (z.B.: Ja/Nein)"
      }
   ]
}

Hi guys,

I'm using FormBuilder in multible tabs (like the "paging" functionality described in the docs). So I'm running multiple, tabbed instances of formBuilder on a site.

Since I want my checkbox-group has predefined fields, I set in the options, that my checkbox has default fields inserted when created. I did it via the "replaceFields" in the formBuilder options.

Because of this I get the error "invalid control type". This happens always then, when I'm not on the last created tab. On the last tab I always can insert a checkbox-group.

Any ideas?

Environment Details:

  • formBuilder Version: 3.2.5
  • Browser: all

Steps to Reproduce

FormBuilder used with paging functionality (like in the docs). Insert 2 or more pages. On the last page inserting a checkbox-group is working, on all the others not!

Screenshot - (optional)

image

@sxndy1
Copy link
Author

sxndy1 commented Apr 13, 2021

Same happening with formbuilder options:
fields: [ { label: 'Sprungmarke', type: 'button' } ]

So, always when customizing or adding custom fields in formbuilder, it isn't working anymore with multiple formbuilder instances like paging elements, where on every page/tab is a different formbuilder instance.

@sxndy1 sxndy1 changed the title Invalid control type with replaced fields (with paging) Invalid control type with replaced or custom fields (in combination with paging) Apr 13, 2021
@IrvanFza
Copy link

Hi @sxndy1, wondering if you already solved this issue or have a workaround for it. I also face the same problem. I get Invalid control type. error only on the first tab, others work perfectly.

@Dhurba123a
Copy link

Hi, Please Make use the below code..which should work
{
type: "checkbox-group",
required: true,
label: "Checkbox Group",
className: "form-check-input col-lg-4",
toggle: false,
inline: false,
access: false,
other: false,
values: [{
label: "Option 1",
value: "option-1",
selected: true
}]
},

@lucasnetau
Copy link
Collaborator

Custom fields was recently fixed to work with multiple instances of formBuilder
#1454

This may be fixed

@lucasnetau lucasnetau added bug needs-reproduction Issue needs full code example to reproduce labels Oct 25, 2023
@lucasnetau
Copy link
Collaborator

Tested and confirmed this is fixed by #1454

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs-reproduction Issue needs full code example to reproduce
Projects
None yet
Development

No branches or pull requests

4 participants