bmichotte / ProMotion-XLForm

ProMotion-XLForm is a ProMotion plugin for XLForm
MIT License
20 stars 21 forks source link

insert_mode :last_row or :button no longer works? #55

Closed jonlunsford closed 8 years ago

jonlunsford commented 8 years ago

I may be misunderstanding this behavior in the first place, apologies if so, but I can't seem to get the example given for multivalued sections to work. I thought this produced something like this XLForm example?

The resulting field acts like a :selector_push with a single textfield. There's no errors or anything, am I just using the API wrong here? If so, is there a better way to achieve that ⬆️ XLForm example?

Thanks!

My Setup:

def form_data
  [
    {
    title: 'Custom Fields',
    cells: [
      {
        title: 'Multi-value with XLFormSectionInsertModeButton',
        name: 'multi',
        options: [:insert, :delete, :reorder],
        insert_mode: :last_row,
        cells: [
          {
            title: 'Some text',
            name: :some_text,
            type: :text
          }
        ]
      }
    ]
  ]
end

Env Details:

jonlunsford commented 8 years ago

Closing. I had these settings in a nested cell, moving the options hash to the top level, just like the example, does work. Thanks!