Widget options not saving

#1

I was building a widget and came to a point where the settings would no longer save. When I changed the values in the form, the save button would still become active, but, clicking it didn’t do anything. No warnings, no errors. It took me way too long to figure out the problem because I was looking for it in my PHP. Wrong place to look… I’m posting here in case it trips up someone else.

The problem: if you use a number input in your widget’s settings form, and set the min and max values there, the widget cannot be updated (ie, settings saved) if you have a number in that input that is outside the min/max values. There’s no indication that something is wrong…the save button just stops working.

3 Likes

#2

To solve, either remove the min/max attributes from your input tag, or, make sure the value in the input is obeying those values. I didn’t test this in all browsers, but, can verify that the (lack of) behavior exists in Firefox.

2 Likes

#3

Good find. See also:

1 Like

closed #4

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

0 Likes