• Resolved ianoliver

    (@ianoliver)


    Hi
    I want to add some address fields to a donation form but I’m having trouble putting them in the right place. I’ve followed the documentation regarding ‘creating custom form fields’, which works fine for putting the fields before or after the donation levels fields. However I want to put them after the email address field, and nothing I do seems to allow this. Am I missing something?

    Thanks

    Ian

    https://wordpress.org/plugins/give/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Devin Walker

    (@dlocc)

    Hey @ianoliver – It sounds like you need to use another action. Have you tried hooking in at give_purchase_form_before_submit ?

    That action should allow you to insert the fields after the email field like you want.

    Thread Starter ianoliver

    (@ianoliver)

    Hi Devin
    I had tried a few other actions but none had the desired effect. give_purchase_form_before_submit did the trick, although the custom field is appearing below the ‘terms’ area. Is there an action to put it between the email address and the terms?

    Thanks for your help

    Plugin Author Devin Walker

    (@dlocc)

    Hey sorry for the delay getting back. I’ve been traveling the last day or so. I think it’s a priority issue with your fields displaying after the terms fields. Try setting the priority like so:

    add_action('give_purchase_form_before_submit', 'add_my_fields', -1);

    Plugin Author Devin Walker

    (@dlocc)

    Any luck?

    Plugin Author Devin Walker

    (@dlocc)

    Hey I’m going to mark this as resolved. If you have any remaining questions please feel free to reach out!

    Thread Starter ianoliver

    (@ianoliver)

    Hi
    Sorry, forgot to get back to you. I actually used give_purchase_form_after_email and that worked.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom fields’ is closed to new replies.