Popup-Maker icon indicating copy to clipboard operation
Popup-Maker copied to clipboard

Form Integrations: Build migration routines from old methods.

Open danieliser opened this issue 5 years ago • 0 comments

We need to migrate away from the settings available in the form editors. That isn't sustainable long term and leads to needless complexity compared to the new methods.

We need to

  • [ ] Deprecate all code related to those functionalities.
  • [ ] Add migration routine for each provider to move options into popup settings.
  • [ ] Add notice for any settings that cannot be migrated.

Migration Routine

  1. Loop over each form.
  2. Pull closepopup, closepopup_delay, openpopup & openpopup_id settings from form.
  3. If openpopup: add Form Submission trigger to the popup with ID matching openpopup_id. May need to add delay to Form Submission trigger equal to that of the closepopup_delay.
  4. If closepopup: Search all popups for those that contain this form, for each found setclose_on_form_submission to 1, set close_on_form_submission_delay to closepopup_delay.
  5. Remove all form settings/actions.
  6. Set option to tell our code that this migration has been proccessed.
  7. Disable loading of old settings screens in form editors based on option saved in 6 above.

Form Plugins

  • [ ] Ninja Forms
  • [ ] Gravity Forms
  • [ ] Contact Form 7

danieliser avatar Jan 15 '20 18:01 danieliser