Title: Fatal error: Uncaught Error: Call to undefined function submit_button()
Last modified: February 17, 2020

---

# Fatal error: Uncaught Error: Call to undefined function submit_button()

 *  Resolved [fawp](https://wordpress.org/support/users/fawp/)
 * (@fawp)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-call-to-undefined-function-submit_button/)
 * I wanted to add a Submit button on a front-end page I am building, and I’ve seen
   WP provides a `submit_button` function.
 * However, when calling that function from within the code of the page, I get a
 * `Fatal error: Uncaught Error: Call to undefined function submit_button().`
 * By searching around, I have found this ticket [https://core.trac.wordpress.org/ticket/20490](https://core.trac.wordpress.org/ticket/20490)
   which seems to imply that the submit_button function was not really intended 
   for use outside of the admin area, and that request was closed as _wontfix_.
 * I have read documentation for both
 * [https://developer.wordpress.org/reference/functions/submit_button/](https://developer.wordpress.org/reference/functions/submit_button/)
 * and
 * [https://developer.wordpress.org/reference/functions/get_submit_button/](https://developer.wordpress.org/reference/functions/get_submit_button/)
 * but neither of these reference pages mention that these functions are not intended
   for use outside of the wp-admin area. The only hint that this would be the case
   by reading those reference pages, is that under the ‘Used By’ section you won’t
   find the functions used outside of the `wp-admin/` folder, but it does not appear
   obvious.
 * Assuming all of the above is correct, my thinking is that both pages should have
   an explicit clarification that the functions are not for front-end usage.
 * Thanks,
    fawp
    -  This topic was modified 6 years, 3 months ago by [fawp](https://wordpress.org/support/users/fawp/).
    -  This topic was modified 6 years, 3 months ago by [fawp](https://wordpress.org/support/users/fawp/).
    -  This topic was modified 6 years, 3 months ago by [fawp](https://wordpress.org/support/users/fawp/).
    -  This topic was modified 6 years, 3 months ago by [fawp](https://wordpress.org/support/users/fawp/).

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

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-call-to-undefined-function-submit_button/#post-12447707)
 * Hi fawp – thank you for the thoughtful suggestion. If you have not already done
   so, I suggest you submit an appropriate user note for the specific docs pages
   so this at least gets documented somewhere. Updates to principal reference doc
   content can be a long time in coming.
 * As you likely know, you could explicitly require_once() the appropriate file 
   in your code so the function becomes available. You would of course get all of
   the other functions declared there as well, which could be useful or be useless
   overhead. I suspect you simply output your own button HTML, which is what I would
   do 🙂
 *  Thread Starter [fawp](https://wordpress.org/support/users/fawp/)
 * (@fawp)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-call-to-undefined-function-submit_button/#post-12448026)
 * Hi bcworkz, my pleasure.
 * Sure, happy to submit notes in there, I will do so now.
 * Thanks for the suggestions about require_once() and HTML, I’ll probably go for
   the latter!

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

The topic ‘Fatal error: Uncaught Error: Call to undefined function submit_button()’
is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [fawp](https://wordpress.org/support/users/fawp/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-call-to-undefined-function-submit_button/#post-12448026)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
