Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Form not saving valid fields if there are invalid fields


Go to End


1784 Views

Avatar
danzzz

Community Member, 175 Posts

13 March 2011 at 1:39am

Edited: 13/03/2011 1:40am

hi,

wondering if anybody else had this problem, or see's this also as a problem. I decorated Member with some fields. I have fields which are required and some wich are not.

On my SS site users can register, just with email and password. There is no need to fill out Names or other fields when sign up. Users can do this later on their profile form.

So let's say you log in to my SS site the first time and open the EditProfilePage. You see this form:

Salutation (DropdownField, Required)
FirstName (Required)
Surname (Required)
Email (Required, EmailField)
Telephone (not required)

Only the Email field ist not empty until now. You start to complete the form. You fill out every field but you forget the Salutation Field and you save the form. You did 1 failure, but the other values where correct.

But SS dont saved the correct values because there where a failure. The user again must fill out the whole form.

How it's possible that SS save's correct values to DB, even if there where some errors on the form?