Title: Function to test &#8220;Valid Form Number&#8221;?
Last modified: January 23, 2018

---

# Function to test “Valid Form Number”?

 *  Resolved [ChatBoxTX](https://wordpress.org/support/users/cdeloach/)
 * (@cdeloach)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/function-to-test-valid-form-number/)
 * Does anyone know of a function I can use to test for a valid, published, and “
   countdown timer” hasnt been reached function? Basically, I want to have input
   of form_id and a boolean to tell me if it is valid, published and still before
   the countdown timer date/time. I could use the following, but it seems a bit 
   heavy:
 *     ```
       $form = new Give_Donate_Form(  $args[$key] );
   
       		//bail if no form ID.
       		if ( empty( $form->ID ) ) {
       			//Do something in error
       		}
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Devin Walker](https://wordpress.org/support/users/dlocc/)
 * (@dlocc)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/function-to-test-valid-form-number/#post-9895625)
 * Hey [@cdeloach](https://wordpress.org/support/users/cdeloach/) – how about using
   WordPress core functions?
 * Check this out: [https://tommcfarlin.com/wordpress-post-exists-by-id/](https://tommcfarlin.com/wordpress-post-exists-by-id/)
 * Let me know if that helps.

Viewing 1 replies (of 1 total)

The topic ‘Function to test “Valid Form Number”?’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Devin Walker](https://wordpress.org/support/users/dlocc/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/function-to-test-valid-form-number/#post-9895625)
 * Status: resolved