Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

Limit mapping fields to count of available CF7 forms #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

felipeelia
Copy link
Contributor

Q A
Bug fix?
New feature?
Issues addressed (#s or URLs) #14
BC breaks?
Deprecations?
Your wordpress.org's username @felipeelia

Description: Currently it's only possible to map 5 forms. This PR makes possible mapping all available forms.

This PR solves an immediate problem, but IMO, the select boxes aren't the ideal solution. We should have a list of all CF7 forms with a list of input fields, with names as name='cf7_mautic_settings[form_id][{$post_id}]' or something like that. What do you think? If you agree with that I can change the necessary code. The only problem would be backward compatibility, as it would change the current behavior of using a bidimensional array and array_search to find the id of given post_id.

Steps to test this PR:

  1. Access the configuration page
  2. Check the quantity of available forms
  3. Add ou remove a form
  4. Access the configuration page again
  5. Recheck the quantity

As we do have just a 1:1 relation, I think we should make possible to user map all forms.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant