-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add remove field functionality #8
Comments
For disabling inputs (only inputs need to be disabled) I would use the The user scenario is the following:
@danandrei please ask @lucaboieru to help with the client CSS/JS for the |
Added a beta version of this in 836d26f this was installed in cc-tool in https://bitbucket.org/jillix/cctool/commits/e0613c4bc9d2a583b32a792658392c4f16088cf9, please take a look and tell me what you think |
Finally a great feature! |
I see the first problem: When a form is loaded for a new (when creating) item, the inputs that were disabled for the last item, are still disabled in the create item form. For empty forms (create new item) all the disabled inputs should be reset to non disabled. |
fixed it in d3dd380 |
And also I noticed that using this feature a user can delete require inputs, for example the username of a user can be deleted, which is not a very good thing. |
A form should be aware that fields can exist or not, and when they exist they have a value.
For the non-existing fields that the user wants to render as inputs, the form should disable the DOM inputs. The user MUST click on an input to start editing it. This makes the user aware that the field now exists (even if it has an empty value)
The opposite should also be true. When the user wants to remove a field (NOT by setting an empty value), he should have a DOM handle to triggers an
$unset
(instead of$set
) and disable the input field in the same time. In this state the user can go back to editing mode it he clicks again on the DOM input.The remove handler can be pointed by a selector specified in the field
selectors
property.The text was updated successfully, but these errors were encountered: