I am using the Codex example to build a custom widget. The specific example seems to be working fine until you click configure and change options values. After you click submit, changes are not saved. Is anyone having the same problem with the specific example? I am trying to build a custom widget using this as an example.
1 comment
Comments are closed.
Solution pulled from OP.
Ok fixed. In
widget-config.php
there is no check if the form has been submitted, so every time you load configuration it updates with empty values or keeps default ones. Add this checkif (!empty($_POST))
before updating options values and display stored value of number-input: