-
Notifications
You must be signed in to change notification settings - Fork 15
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
Saving form selections #38
Comments
@Natkeeran the approach is right. Instead of system variables, we can set a new table as I do for the templates. |
And we can serialize (json) all the form_state, the complete settings, which are basically what is inside cmodelmap and objectmap |
@DiegoPino Ok, I see. Will review how you are storing the info in a table. Thanks. |
@Natkeeran some help: this class stores the templates This here stores and retrieves the templates https://github.com/mnylc/islandora_multi_importer/blob/master/includes/utilities.inc#L141-L164 You would only need to add a json_encode before saving and json_decode when retrieving. |
I've approached this a little differently by coding an implementation of hook_form_alter which is documented in a new islandora_multi_importer.api.php like so...
|
Just updating this to announce that I have a new implementation of hook_islandora_multi_importer_form_alter that populates my consistent defaults for ALL of the form fields including all CModels. I'm planning to share it at the Batch Ingest workshop I'm co-hosting next week at IslandoraCon. |
One UI improvement suggested is to save the selections for "CMODEL Mapping", "Object Properties Mapping" forms.
For instance, in the import.form.inc islandora_multi_importer_form_submit function, the "sequence and ordering" field selection can be saved as below:
And then in the islandora_multi_importer_objectmapping_form the saved variable info can be retried and set below:
I've tested this and this seems to work. If a stored value is not found as one of the options, it would default to the first option as it currently does.
Questions:
@DiegoPino
The text was updated successfully, but these errors were encountered: