Title: adding a button, the form does not load
Last modified: June 2, 2022

---

# adding a button, the form does not load

 *  Resolved [comptedev](https://wordpress.org/support/users/comptedev/)
 * (@comptedev)
 * [4 years ago](https://wordpress.org/support/topic/adding-a-button-the-form-does-not-load/)
 * hi,
    I added the following code in the function.php file of my theme
 * `add_action( ‘give_fields_after_donation_levels’, function( $collection ) {
    
   $collection->append( // Select field with options. give_field( ‘select’, ‘myConference’)-
   >options( [ ‘east’, __( ‘Eastern Conference’ ) ], [ ‘west’, __( ‘Western Conference’)],[‘
   north’, __( ‘Northern Conference’ ) ], ) ->label( __(‘conference’) ); });
 * there is a circle that turns, the form does not load.

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

 *  Plugin Support [Rick Alday](https://wordpress.org/support/users/mrdaro/)
 * (@mrdaro)
 * [4 years ago](https://wordpress.org/support/topic/adding-a-button-the-form-does-not-load/#post-15706502)
 * Hi [@comptedev](https://wordpress.org/support/users/comptedev/),
 * Glad you reached out. I just noticed there’s a syntax error in our sample code
   that you copied too.
 * The label line is missing a closing parenthesis.
    It should read like this: `-
   >label( __(‘conference’))`
 * That should fix things.
 *  Thread Starter [comptedev](https://wordpress.org/support/users/comptedev/)
 * (@comptedev)
 * [4 years ago](https://wordpress.org/support/topic/adding-a-button-the-form-does-not-load/#post-15706947)
 * hi,
    thank you for your reply,I just tested the code works now but randomly.
 * sometimes the form loads and 10 minutes more the form no longer loads.
 * when a person chooses an option this one does not appear, neither in the administration,
   nor in the mail
 * cordialy
 *  Plugin Support [Matheus Martins](https://wordpress.org/support/users/matheusfd/)
 * (@matheusfd)
 * [4 years ago](https://wordpress.org/support/topic/adding-a-button-the-form-does-not-load/#post-15711686)
 * Hi, [@comptedev](https://wordpress.org/support/users/comptedev/).
 * When something works for some time and then it doesn’t work, or when it works
   randomly, it’s usually related to cache.
 * If you’re not familiar with caching, it’s a method of saving server resources
   by storing copies of a page or site, so that the next visitor’s visit doesn’t
   trigger a call to the server at all, they just get the copy that was saved.
 * We put together this deep dive into what caching is and how it can cause problems:
   [https://givewp.com/documentation/resources/caching/](https://givewp.com/documentation/resources/caching/)
 * Caching works really well for speeding up sites, but when a saved copy of the
   site has sensitive information in it (like donor info) it’s important that GiveWP
   not share that with the next visitor.
 * If GiveWP is not convinced that the browser requesting the data is the correct
   one, it defaults to not showing the data.
 * In order to verify that my hypothesis is right here, we need to exclude any asset
   loaded by GiveWP from the cache.
 * Caching is handled differently on various sites and web hosts, and most of them
   allow for excluding specific URLs or parts of URLs from caching. At the very 
   least, you should exclude the following slugs from caching:
    /donations/ /donation-
   confirmation/ /donor-dashboard/
 * Also, the following query strings:
    give-embed=donor-dashboard giveDonationFormInIframe
   =1
 * Your host or the caching plugin/solution you are using can help with that. Some
   of them may require what’s called a “wildcard” like /donations/* to capture all
   subdirectories under the /donations/ folder.
 * You can also temporarily disable caching on the site to confirm that the uncached
   site isn’t showing the problem.
 * While fine-tuning cache falls outside the scope of the support we’re able to 
   provide, your success with online donations is our number one priority, and we’re
   happy to provide any tips.
 * If it still doesn’t fix the issue, we need a place where we can reliably replicate
   the issue.
 * ​Please let us know if you have further questions or need additional assistance!

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

The topic ‘adding a button, the form does not load’ 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/)

 * 3 replies
 * 3 participants
 * Last reply from: [Matheus Martins](https://wordpress.org/support/users/matheusfd/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/adding-a-button-the-form-does-not-load/#post-15711686)
 * Status: resolved