• Resolved Steve

    (@equestrianllc)


    Hello,

    I am trying to use GiveWP donation forms to track and process political donations using PayPal. there are two items missing from the “Donation Form Options>Form Field” screen.

    1 – the Last Name field needs to be a required field – I was able to find a snippet that forces the Last Name field to be required. however, is there a way to show this as a radio button option similar to the other fields in the Form Field screen?

    2 – the need for a required “Occupation” field – I wasn’t able to find any way to add an Occupation field after the Last Name field and before the Company Name field. how do I add this new (custom) field in the appropriate location?

    GiveWP v2.13.4

    thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Matheus Martins

    (@matheusfd)

    Hey @equestrianllc,

    ?Glad you reached out. I can help you with that.

    1. The last name was designed to be optional because most of the payment gateway doesn’t require a last name. Right now, it’s possible to turn it into a required field by using custom code (the one you used, probably). However, it’s not possible to make it a radio button.

    Although we do not have this feature out of the box, it would be interesting and valuable for us to understand how it would work for you and how it would improve your workflow, so the product development team has some insights about how it would behave.

    Also, is there any workaround that you are using? It would be good to hear from you about that too, and what this feature would allow you to do. All ideas are appreciated, and I’m happy to share your insights with the product development team so that they can discuss the feasibility of this feature.

    2. You can add this custom field using some custom code, like you can see here https://github.com/impress-org/givewp-snippet-library/blob/master/form-customizations/custom-fields-plugin.php

    If you need assistance implementing custom PHP code on your website we have this guide:

    https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/

    Please note that this code snippet is provided as an example of how you can extend GiveWP with code. It’s up to you to implement and customize to your liking. We cannot provide support for custom code on your website, only the code that we create and distribute.

    On the other hand, there is an add-on called Form Field Manager (https://givewp.com/documentation/add-ons/form-field-manager/) that allows you to do that easier than adding it using custom code.

    Thanks for using GiveWP! Have a great day.

    Thread Starter Steve

    (@equestrianllc)

    Hi Matheus,

    thank you for the detailed response. after trying a few of the suggestions, I was able to make some progress, but still have one more problem.

    1. I wish there was a radio button for this, but the snippet “require-last-name.php” did make the change I was looking for. radio buttons similar to the “Company Field” would be great. (see Settings>Default Options>Form Fields>Company Field)

    2. the custom field code did not work so well, but I did try the snippet “add-donor-meta.php”. it adds a phone number field in the approximate location I need. I modified all phone number references to Occupation, and the code did place the new Occupation field before the Email Address field.

    3. the new problem. the donor’s mailing address is also required for a political donation. I am able to add this requirement in the Payment Gateways>PayPal section using Collect Billing Details. after checking the box, the donor’s address fields are now located below the PayPal button. this leaves the user with a confusing payment processing experience. is there a way to keep the Personal Info section and the Billing Details section together? that is, move the PayPal button to the bottom of the form, below the Donation Total field? I tried using the “customize-fieldset-order.php” snippet, but I did not see any Donation form changes after the snippet activation.

    thanks!

    Plugin Support Rick Alday

    (@mrdaro)

    Hi @equestrianllc,

    Happy to clarify. The short answer to your question is no. There’s no way to move the Paypal billing fields to a different place.

    The other alternative is to extend the Custom Fields snippet to include address fields.

    Thread Starter Steve

    (@equestrianllc)

    Hi Rick,

    could I get clarification on the fieldset reordering? I tried using the snippet for various other fieldsets that were not PayPal related, and I was not able to reorder any of the fieldset ids. does this snippet work? I am using the Legacy Donation Form.

    even if I try the Custom Field alternative, I would need to reorder the fieldset ids.

    thanks!

    Plugin Support Matheus Martins

    (@matheusfd)

    Hey @equestrianllc,

    This reordering fieldset snippet (https://github.com/impress-org/givewp-snippet-library/blob/master/form-customizations/customize-fieldset-order.php) works for the legacy donation form, and we do not encourage you to use it with the multi-step form.

    You could reorder things using the CSS order property too (https://developer.mozilla.org/en-US/docs/Web/CSS/order), but the code needs to be developed by you.

    Thanks for using GiveWP! Have a great day.

    Thread Starter Steve

    (@equestrianllc)

    Hi Matheus,

    as mentioned, I am using the Legacy Donation Form.

    the fieldset re-order snippet does not seem to use the fields in the Legacy Donation Form. could you clarify the snippet by referencing the fieldsets used in the Legacy Donation Form?

    thanks!

    Plugin Support Rick Alday

    (@mrdaro)

    @equestrianllc,

    Although we do have that snippet in our library, we discourage people from using it and prefer that they use the CSS order property to reorder things (https://developer.mozilla.org/en-US/docs/Web/CSS/order).

    That WARNING at the top is super important. Historically it “works” until you add Fee Recovery or do anything else with your fields. It really can cause break things easily. If reordering fields on your site is a must, then we encourage you to use CSS instead.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Political donation fields missing’ is closed to new replies.