From: Stephan G. <f....@gm...> - 2010-01-16 14:55:58
|
Daniel Steiner schrieb: > Hi > > I have a form with several input fields of type number, text, > radio-button, checkboxes. > > Now, I added value checking for a field of type number by using regex > parameter of SFI. > > For creating a new page by form everything looked ok. Value got checked > correctly as being only numbers. Hi Daniel. The problem is, that for a new mandatory set of radiobuttons a "None" button is automatically added which is marked with an id ("input_4" in your example on referata.com). This button is not added when editing the article afterwards. The Javascript function responsible for validating that a radiobutton was indeed selected fails if the None button is not found, causing the "Save page" action to succeed regardless of the inputs. To work around you could include a "default" parameter for mandatory radiobuttons, e.g. "default=scheduled" for the Status field. Yaron: Replacing if (none_button.checked) by if (none_button && none_button.checked) in validate_mandatory_radiobutton should do the trick. Stephan |