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

Support integration with Webform Matrix Component module #19

Open
patdunlavey opened this issue Oct 20, 2015 · 0 comments
Open

Support integration with Webform Matrix Component module #19

patdunlavey opened this issue Oct 20, 2015 · 0 comments

Comments

@patdunlavey
Copy link
Member

One of the potentials of the islandora webform module is to dramatically reduce the user pain compared with dealing with lengthy MODS forms. The webform matrix component module (https://www.drupal.org/project/webform_matrix_component) could theoretically permit a single webform component to stand in for all the text fields in the MODS form!

You could configure your matrix component to have two elements: a select list of field names, and a text field for value. Then use its add-row link (ajax) to add values for an arbitrary number of MODS fields.

Conceivably this could be implemented directly in iwi by mapping the matrix component to an xml datastream, and then when rendering the form component, pull the field paths out of the xml schema dynamically. Then during ingest, matrix component values mapping would be determined by the chosen field path for each row of the submission data.

But one could use the webform_matrix_component module now by:
1 - Manually setting up the fields select list in the matrix component's configuration
2 - Writing a hook_iwi_set_form_element_alter to pull those values out of the submission and map them to the appropriate field path in a call to iwi_set_form_element_byhash().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant