-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Inside <form> not working #6
Comments
@sarath2 <form editable-form>
<a href="#" editable-text="user.name">{{ user.name | uppercase }}</a>
</form> |
Nope. I mean, I have a form inside with varies controls. When I put one xeditable input box inside this form,it not working properly(Not shown text-box when click the link). |
Could you make a jsfiddle to demonstrate the issue? |
Closing as too old. |
hi, |
hi, |
vitalets, Here's an example: http://jsfiddle.net/eJnT9/1/. In my case, I'm using a form to mainly layout the fields, however, there may be one or two values that I'd like to update in-place. Thanks for looking into this, and let me know if you need more info. |
Hi, vitalets: seeing the same - clicking link on editable-text has no effect if tag is placed inside a form. created a repro using your starter template (but updated AJS to 1.2.9): http://plnkr.co/edit/NgMZ3DydXJKgddJ6gZyt?p=preview |
Hello, I have the same problem here. I use a form to layout element cause I use a bootstrap3 theme. I understand that editable-form is mandatory for submiting the whole forms, but x-editable should work fine for simple field editing even for fields inside a form. |
You have to explicitly call <form editable-form>
<a ng-click="$form.$show()" href="#" editable-text="user.name">{{ user.name | uppercase }}</a>
</form> It won't automatically hide, either you need to call IMO, the problem here is enforcing forms with |
Same issue - using <form> elements in our application to take advantage of Bootstrap 3 layout, but with editable-form declared on the form, none of my editable-text fields will open up when clicked. Demonstrated in this plunkr: http://plnkr.co/edit/NgMZ3DydXJKgddJ6gZyt?p=preview |
Having the same issue, anyone have a fix? |
Here's a fix, until the library can incorporate this logic internally: <a href="#" ng-click="$form.$show()" e-ng-blur="$form.$hide()" editable-text="model.value">{{ model.value }}</a> |
I'm using an editable-select and this does the following:
On Fri, Jun 13, 2014 at 11:59 AM, John Freeman notifications@github.com
|
Mind giving a minimal example or fiddle? |
http://plnkr.co/edit/3148OUwbdxe89QRhPyTA?p=preview Just copied the above plunker from above and moved the select inside the form and added your fix. |
It's not getting the |
Also experiencing this problem. @thejohnfreeman's fix does not work for me. |
Hello |
Having the same problem here. As promolic1 said, the workaround doesn't show the save/cancel button, so its out. AngularJS uses "novalidate" on the form tag to enable its own validation, so it might be that xeditable and Angular's form validation are incompatible without modifying the source of angular-xeditable to ignore the form tag. |
At the end, to be able to use this I dropped the outer form to use the inner forms for my tables. Unfortunately this disables the submit on enter function and the form validation. |
Thanks promolic1. For anyone who might want to use single xeditable form elements (without whole form editing) + use angular's form validation, its currently not possible. They are mutually exclusive at current revision. But with a small hack you can have both right now. In editableDirectiveFactory, look for the block of code following this comment: // element wrapped by form and add "hasForm = false;" after the else, and there you have it. Of course this will break whole form editing capability of xeditable and it is definitely not a permanent fix |
Thanks @dittonamed I hope to try your idea soon. |
+1 Also having this issue. |
Just bumped to this very same issue as well. Simply having this does not work:
|
I am facing same issue: Some normal fields only one field which is xeditable, but that does not workGetting following error on web console: Form with editable elements should have I don't want to use editable-form with tag, but just want one field to behave like xeditable. Can't move this field outside form because this comes in middle of form :( |
@dittonamed @promolic1 Thank you for the solution. Yes, it works but it breaks the form editable capability. I have modified a bit to work with form edit option. hasForm = eFormCtrl.$addEditable; |
Any ETA on this merge? |
Here is the list of things to do. I'm planning on working on them in my spare time... |
Resolved by #315 |
Seriously? |
@mitcht Yes , please advise me, if i have two rows and i modified all two rows values, myform.$data is having only last row data only . it is not maintaining entire table data in ng-repeate.please adivise me |
vitalets - Is there a way to do multiple separate editable forms within a single form element? I've got a large form and would like to break it up a bit. Thanks for any help. |
This still seems to be broken. I tried different hacks and "solutions", including the "e-single" which doesn't seem to do anything. There seems to be workarounds here to get somewhere, but what I want to accomplish is the following: I could just do all validation through onbeforesave="validate($data)" or something like that, but that takes quite a bit of extra code and I would like to use angulars inbuilt features like dirty, pristine, etc., which is only available if you surround everything with form-tag. So, is there a solution to achieve the above? |
Even the latest master branch had this issue :/ +1 for fixing it |
What's worked for me is to just nest form elements inside each other. I am well aware that that approach is non-standard, won't validate, and could fairly be called "hackish". |
Just because my commit has been merged does not mean that it has been built into the bower distribution as of the date of this comment. Anyone who knows how this stuff works would know that they can clone the repo, build it locally and use the results from that build on their site. This will make e-single work. If you find yourself bower-installing xeditable and then going "hey e-single isn't working" you need to do your own build on your own machine. Learn this. Contribute. It will take you to the next level. |
I implemented the e-single fix by simply changing the lines: |
You could always ask to be a repo admin :) |
Submitted build as pull req. Fingers crossed. |
#422 merged bower install angular-xeditable now allows e-single with version 0.1.10 |
Sounds good, but to me it doesn't seem to be implemented in the way we have "fixed" it in the thread. Now it's like this: |
It allows xeditable elements to be used with a standard ng-form element. You can then create your own form, and the elements themselves don't have to validate using the internal e-form validation. Just make sure they have names, and they will show up on your ng-form scope object with validity booleans. This allows you to do things like implement angular-message without having to come up with ways to sidestep the built in validation in xeditable. |
What a joke that this hasn't been fixed. It makes the plugin completely unusable. |
@HugCoder do you have an open pull req? There doesn't seem to be one. If you create a pull req, i'll merge it. @im1dermike |
i have a form and i want to edit the only clicked editable controller not all the editable controllers in the form. |
@mitcht can you provide a code sample of how to use your fix? It sounds like you're saying we should try using ng-form instead of the built in e-form now. Thanks- |
Maybe check out ag-grid if you want editable cells in a table. |
Following not working..
The text was updated successfully, but these errors were encountered: