aldryn-forms icon indicating copy to clipboard operation
aldryn-forms copied to clipboard

Form Fields should only be placeable as an descendant of the Form plugin

Open stefanfoulis opened this issue 12 years ago • 9 comments

stefanfoulis avatar Jul 26 '13 11:07 stefanfoulis

Reopened due to https://github.com/aldryn/aldryn-forms/commit/3231d76b45cdb72301e91ac747e11dffa5d2b69f

Chive avatar May 21 '14 13:05 Chive

Is that means that we can place field under form but in several levels of containers?

ghost avatar Jan 24 '18 13:01 ghost

Yes. This doesn't mean that fields can't have multicolumn or other plugins as parents, this means that fields should always be descendants of the form plugin, doesn't matter where in the tree.

czpython avatar Jan 24 '18 13:01 czpython

Thanks for your answer. Good to know

ghost avatar Jan 24 '18 13:01 ghost

Could this be reverted to 467adbd commit, because it causes more problems than it solves? If you, by accident, place form field outside the form plugin (which is now possible), it causes database error.

treavis avatar Jan 29 '18 15:01 treavis

Reverting to that commit would be a major backwards incompatible change and not really aligned with the design of this app. There are more occurrences of users adding non-field plugins under the form than users adding the form fields accidentally outside the form.

czpython avatar Jan 29 '18 15:01 czpython

Ok. Good to know. I'll keep using my fork. Just asked because this actually happened, and it could only be fixed by manually removing entries from database.

treavis avatar Jan 29 '18 15:01 treavis

On cms 3.5 we're introducing the ?structure GET parameter which is for structure-only view, hopefully this makes it easier to correct these issues without having to do so manually on the db.

czpython avatar Jan 29 '18 15:01 czpython

I am afraid that idea of placing field only under some form plugin is not good. There may be cases where the user wants to place the field outside the form. And input outside form is perfectly html valid code.

https://validator.w3.org/:

<!doctype html>
<html lang="en">
<head>
    <title>Title</title>
</head>
<body>
   <input>
</body>
</html>

zbohm avatar Feb 05 '20 16:02 zbohm