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.

Archive /

Our old forums are still available as a read-only archive.

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

Forlorn EditableFormFields in database


Go to End


2 Posts   1426 Views

Avatar
xmedeko

Community Member, 94 Posts

6 June 2007 at 4:01pm

Edited: 06/06/2007 4:33pm

Hi,

if you create a fresh new contact form in CMS, do not save it, add some form fields, do not save it, and delete the page. Then, the created form fields in the MySQL table `EditableFormFields` have `ParentID` == 0. They are not assigned to any page, cannot be deleted from CMS.

Maybe the addfield() method in the FieldEditor class should not write the created field. Then, client javascript has to make some unique ID, ID < 0, and then the fields (with ID < 0) should be created and written in the saveInto().

Cheers
Andy

Avatar
xmedeko

Community Member, 94 Posts

6 June 2007 at 5:22pm

Edited: 07/06/2007 2:30pm

P.S. There's more of weird behaviour of the FieldEditor:

- remove some fields and go to another page. No 'Unsaved Changes' dialog is shown and you can jump to another page directly.

- add some new fields, go to another page and choose 'Discard changes' in the 'Unsaved Changes' dialog. When you return, you see, that changes has not been discarded (i.e., the added fields are still there)

- 'Cancel draft changes' function (aka rollback), does not work.