Popup-Maker
Popup-Maker copied to clipboard
Form Integrations: Build migration routines from old methods.
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
- Loop over each form.
- Pull
closepopup
,closepopup_delay
,openpopup
&openpopup_id
settings from form. - If
openpopup
: addForm Submission
trigger to the popup with ID matchingopenpopup_id
. May need to add delay to Form Submission trigger equal to that of the closepopup_delay. - If
closepopup
: Search all popups for those that contain this form, for each found setclose_on_form_submission
to1
, setclose_on_form_submission_delay
toclosepopup_delay
. - Remove all form settings/actions.
- Set option to tell our code that this migration has been proccessed.
- 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