esmero / webform_strawberryfield

Provides Webform integrations to feed a field of Strawberries. Mr. Wizard of WebOz
GNU Lesser General Public License v3.0
2 stars 6 forks source link

Have a chronology group of fields repeatable #32

Open senyzspalding opened 4 years ago

senyzspalding commented 4 years ago

For an EAD we are looking to have this group of fields repeatable. So for example for a person maybe they will do a date of birth, date of employments, and date of death. I can't think of a way in doing this on what is available.

This is an example of the group image

DiegoPino commented 4 years ago

@senyzspalding can you share that Webform snippet? (the YML representation is good enough)

senyzspalding commented 4 years ago

biographical_historical_information: '#type': webform_wizard_page '#title': 'Biographical / Historical Information' biographical_historical_note: '#type': textarea '#title': 'Biographical / Historical Note' '#multiple': true chronology: '#type': details '#title': 'Chronology List' chronology_item: '#type': webform_section '#title': 'Chronology Item' chron_event: '#type': textfield '#title': Event chron_date_type: '#type': radios '#title': 'Date Type' '#options': Date: Date 'Date Range': 'Date Range' Approximate: Approximate chron_date: '#type': date '#title': Date '#states': visible: ':input[name="chron_date_type"]': value: Date chron_from_date: '#type': date '#title': 'From Date' '#states': visible: ':input[name="chron_date_type"]': value: 'Date Range' chron_to_date: '#type': date '#title': 'To Date' '#states': visible: ':input[name="chron_date_type"]': value: 'Date Range' chron_date_free_text: '#type': textfield '#title': 'Free Text' '#states': visible: ':input[name="chron_date_type"]': value: Approximate

DiegoPino commented 4 years ago

@senyzspalding i will give this a try later today and can come back on monday with some ideas. I still have a large TODO list for this beta2 release (going public on monday) but it seems this can be solved via a custom compound element that uses as those elements as individual inputs. Probably do-able directly via the UI

senyzspalding commented 4 years ago

@DiegoPino no rush it was something we were talking about yesterday afternoon.