Title: Adding custom field
Last modified: August 30, 2016

---

# Adding custom field

 *  Resolved [zdavis](https://wordpress.org/support/users/zdavis/)
 * (@zdavis)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-field-4/)
 * I’ve followed your instructions for creating a custom field here ([https://givewp.com/documentation/developers/how-to-create-custom-form-fields/](https://givewp.com/documentation/developers/how-to-create-custom-form-fields/))
 * This is working but the problem I have is that I want it to pop up in the modal
   window upon click. Right now it’s just in the sidebar with
    ‘add_action( ‘give_after_donation_levels’,‘
   give_donation_custom_form_fields’, 10, 1 );’
 * What should I change this to in order to make it pop up in the modal window?
 * [https://wordpress.org/plugins/give/](https://wordpress.org/plugins/give/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [Matt Cromwell](https://wordpress.org/support/users/webdevmattcrom/)
 * (@webdevmattcrom)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-field-4/#post-6824670)
 * Hi there,
 * You can swap out the `give_after_donation_level` action with any of the following
   instead:
    1. `give_purchase_form_after_personal_info`
    2. `give_payment_mode_after_gateways`
    3. `give_purchase_form_after_email`
 * Thanks!
 *  [alexbuckles](https://wordpress.org/support/users/alexbuckles/)
 * (@alexbuckles)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/adding-custom-field-4/#post-6824776)
 * Hello,
 * How do I accomplish this as a non-developer? I can follow along and place code
   as instructed, but I don’t know where to put it. We are a non-profit looking 
   to create the ability for users to be able to select what they want their donation
   to be attributed to. We would create a dropdown list with a number of fixed options.
 * Thanks for any assistance you can provide.
 * -Alex
 *  Plugin Contributor [Devin Walker](https://wordpress.org/support/users/dlocc/)
 * (@dlocc)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/adding-custom-field-4/#post-6824778)
 * Hey hey,
 * We put together this article to help you insert custom functions safely: [https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/](https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/)
 * The easiest way as a non-developer is to use our Form Field Manager Add-on. However,
   we understand not everyone has budget for this so that’s why we provide the code
   alternative.
 * Please let me know if you have anymore questions!
 *  Thread Starter [zdavis](https://wordpress.org/support/users/zdavis/)
 * (@zdavis)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/adding-custom-field-4/#post-6824815)
 * To be clear for anyone else who may read this I used this code
 *     ```
       function give_donation_custom_form_fields( $form_id ) {
   
       	//Add "If" statement to display for a specific form
       		?>
               <p id="give-fund-wrap" class="form-row form-row-wide">
       			<label class="give-label" for="give-fund"><?php _e( 'What fund would you like this to go towards?', 'give' ); ?>
       			<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'If you dont have a specific fund please leave blank', 'give' ) ?>"></span></label>
       			<textarea class="give-textarea" name="give_fund" id="give-fund" placeholder="What fund would you like this to go towards?" ></textarea>
       		</p>
       	<?php
       }
   
       add_action( 'give_purchase_form_after_email', 'give_donation_custom_form_fields', 10, 1 );
       ```
   
 * I slightly changed it from the custom fields instructions for what I needed because
   the div was covering my form and making other fields uneditable as well as giving
   some unwanted spacing. Thanks for the
    `give_purchase_form_after_email`

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Adding custom field’ is closed to new replies.

 * ![](https://ps.w.org/give/assets/icon-256x256.jpg?rev=2873287)
 * [GiveWP - Donation Plugin and Fundraising Platform](https://wordpress.org/plugins/give/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/give/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/give/)
 * [Active Topics](https://wordpress.org/support/plugin/give/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/give/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/give/reviews/)

## Tags

 * [form](https://wordpress.org/support/topic-tag/form/)
 * [layout](https://wordpress.org/support/topic-tag/layout/)

 * 4 replies
 * 4 participants
 * Last reply from: [zdavis](https://wordpress.org/support/users/zdavis/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/adding-custom-field-4/#post-6824815)
 * Status: resolved