<iframe> embedded in Dromoās modal chrome, and communicates back via postMessage.
The import flow
The default step order is:REVIEW):
insertAfter | Inserted after |
|---|---|
"HEADER_SELECT" | Header row detection |
"COLUMN_MATCH" | Column mapping |
"SELECT_MATCH" | Select field matching ā just before Review |
Quick start
Register a custom step before callingopen(). The url is the page Dromo will load inside the iframe.
Driving navigation from the iframe
Your iframe page posts messages towindow.parent to control navigation.
| Message | Effect |
|---|---|
{ type: "DROMO_NEXT" } | Advance to the next step |
{ type: "DROMO_BACK" } | Return to the previous step |
{ type: "DROMO_MESSAGE", payload: any } | Trigger the onMessage callback |
Modifying the schema from a custom step
Use theonMessage callback to mutate the import schema in response to what the user does in your iframe. It receives the same uploader instance as step hooks, giving you access to addField, removeField, addRows, and more.
Multiple custom steps
Register multiple steps at the sameinsertAfter position ā they are presented in registration order:
Full example: dynamic field builder
The example below is a self-contained iframe page that lets the user define extra fields before Review, then sends them back viaonMessage.
Step registration
Iframe page (add-fields.html)
onMessage callback runs
Dromo calls
onMessage(uploader, payload). The callback iterates the fields and calls uploader.addField() for each one.For a complete configuration reference, see the Custom Steps reference.
