impress-org / give-double-the-donation

Integration with Double-the-Donation
GNU General Public License v3.0
0 stars 0 forks source link

Fix: prevent field from showing up twice #16

Closed Benunc closed 2 years ago

Benunc commented 2 years ago

The previous hook was causing the additional field to display multiple times. This hook only displays once.

Resolves #15

Description

Before, when logged-out visitors viewed a form, if registration and login fields were enabled, the DtD search field displayed twice. Now it does not.

Affects

The location of the output

Visuals

image

Testing Instructions

  1. Install GiveWP
  2. Install this PR
  3. Put in our test credentials in the DtD settings (contact Me on Slack for those credentials)
  4. Create a form (any template) and navigate in that form's settings to the form Fields tab
  5. Enable either the "login" or "registration + Login" option. (see image)
  6. Save or publish the form.
  7. Visit the front end of the form.
  8. For Classic and legacy, scroll to see that the DtD field is added twice as in the image on the original post. For Multistep, click through to the appropriate step of the form.

Pre-review Checklist