ctsit / search_and_populate_data_from_another_project

REDCap Module to search another project for data to populate data into the current form
Other
5 stars 2 forks source link

A modal dialog box should launch after selecting a source record #4

Closed ChemiKyle closed 4 years ago

ChemiKyle commented 4 years ago

Currently, upon clicking a record in the search box, the data is unceremoniously piped into the target fields.

It would be nice to have a modal dialog appear upon selection that shows the target fields and the values that would be piped into them, i.e.

Target Field Source Value
First name John
Middle Name Q
Last Name Public

You may want to do this as a function, launchConfirmationModal(response_data), which should be called here:

https://github.com/ctsit/search_and_populate_data_from_another_project/blob/802b637fc6fc543904f42ed26fa9611a7f5073d0/js/custom_data_search.js#L75

instead of pasteValues.

The modal dialog should also have a button at the bottom that allows the user to confirm the piping, clicking this button should fire the pasteValues() function.

You may want to reference a different module, Move Data to Other Event for implementation of a modal dialog.

ChemiKyle commented 4 years ago

This was addressed by PR #8