Title: Widget Errors from Uninitialized Options
Last modified: August 20, 2016

---

# Widget Errors from Uninitialized Options

 *  [AJStacy](https://wordpress.org/support/users/ajstacy/)
 * (@ajstacy)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/widget-errors-from-uninitialized-options/)
 * I have been teaching myself how to code custom widgets in wordpress and I have
   most of it figured out except how I initialize my widget options. Currently, 
   when you first activate my events list widget, php gives me errors because it
   can’t find the options in the table, but if I click “save” once, it creates the
   options and I no longer have a problem.
 * My Question is: How do I get them into the options DB beforehand to avoid the
   error?
 * _[119 lines of code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_

Viewing 1 replies (of 1 total)

 *  Thread Starter [AJStacy](https://wordpress.org/support/users/ajstacy/)
 * (@ajstacy)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/widget-errors-from-uninitialized-options/#post-2336269)
 * Any ideas? (bump)

Viewing 1 replies (of 1 total)

The topic ‘Widget Errors from Uninitialized Options’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [AJStacy](https://wordpress.org/support/users/ajstacy/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/widget-errors-from-uninitialized-options/#post-2336269)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
