formly-js / vue-formly-bootstrap

MIT License
51 stars 13 forks source link

formly fieldGroup #11

Closed jaideepdas closed 6 years ago

jaideepdas commented 6 years ago

I am trying to use field group option of formly it keeps getting error.

{
          className: 'panel-body',
          fieldGroup: [{
            wrapper: '<div class="col-md-12"></div>',
            key: 'isDisabled1',
            type: 'list',
            options: [{
              label: 'Yes',
              value: true
            }, {
              label: 'No',
              value: false
            }],
            templateOptions: {
              atts: {},
              inputType: 'radio',
              label: 'Is Disabled'
            }
          }, {
            wrapper: '<div class="col-md-12"></div>',
            key: '_sort1',
            type: 'input',
            templateOptions: {
              atts: {
                type: 'number',
                step: '0.1'
              },
              label: 'Sort Order'
            }
          }]
        }

Error Unknown custom element: <formly_undefined> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

Is this option not implemented? http://docs.angular-formly.com/v6.4.0/docs/field-groups

matt-sanders commented 6 years ago

Nope, it's not implemented, that's for Angular Formly, so there are quite a few differences. Be sure to refer to the specific docs for either Vue Formly or Vue Formly Bootstrap. See the section in the Vue Formly docs about advanced layouts

jaideepdas commented 6 years ago

The URL shared was for reference. So is there a work around. Else will have to do away with formly as it seems.

On 9 Jan 2018 12:53 am, "matt-sanders" notifications@github.com wrote:

Closed #11 https://github.com/formly-js/vue-formly-bootstrap/issues/11.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/formly-js/vue-formly-bootstrap/issues/11#event-1414279750, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQtuE8GYTDHFiHaAKfollHs8UMK5O9Iks5tImsmgaJpZM4RWciY .

matt-sanders commented 6 years ago

Well, it depends on what you want to do. there is the wrapper option available to each field which could help you. Otherwise you could always use a fully custom layout. See the first example here as it uses the wrapper option.

jaideepdas commented 6 years ago

Thanks will give that a try

On 9 Jan 2018 1:17 am, "matt-sanders" notifications@github.com wrote:

Well, it depends on what you want to do. there is the wrapper option available to each field which could help you. Otherwise you could always use a fully custom layout. See the first example here https://matt-sanders.gitbooks.io/vue-formly/content/v/2.0/how_to_use/advanced_form_layouts.html as it uses the wrapper option.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/formly-js/vue-formly-bootstrap/issues/11#issuecomment-356075345, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQtuHIUaSjh-a9pgwS3FFPonX9hV3i7ks5tInC4gaJpZM4RWciY .