Inside <form> not working
Following not working..
<form>
<a href="#" editable-text="user.name">{{ user.name | uppercase }}</a>
</form>
@sarath2
if you want to have single editable element, there is no need to wrap it into form tag.
If you want to have several editable elements and submit them together, you shoud wrap it into form with editable-form directive:
<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). Inside div working properly.
Could you make a jsfiddle to demonstrate the issue? use this as template http://jsfiddle.net/NfPcH/3
Closing as too old. Please feel free to reopen if you still have this issue.
hi, sorry to bring this up but i am also facing same thing, i have followed all steps in demo, when i click on an editable element nothing happens
hi,
please recheck that you added module dependency var app = angular.module("app", ["xeditable"]);
If it's ok but still not working please try starter template: http://vitalets.github.io/angular-xeditable/zip/angular-xeditable-starter.zip
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. also your angular x-editable is a great work !
You have to explicitly call <form-name>.$show() or $form.$show() (if your form has no name attribute) for it to work.
<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 $form.$hide().
IMO, the problem here is enforcing forms with editable-* elements to have the editable-form attribute. I can think of some use cases that wont require what editable-form has to offer.
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:
- doesn't fix the styling issue
- allows me to click on it and the select dropdown appears
- doesn't allow me to save or cancel ᐧ
On Fri, Jun 13, 2014 at 11:59 AM, John Freeman [email protected] wrote:
Here's a fix, until the library can incorporate this logic internally:
{{ model.value }}
— Reply to this email directly or view it on GitHub https://github.com/vitalets/angular-xeditable/issues/6#issuecomment-46028619 .
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 editable-click class applied, so I'd dig in the code to see where it's failing. I'm not using the editable-select, so I don't have your problem.
Also experiencing this problem. @thejohnfreeman's fix does not work for me.
Hello I am on the same boat. Also, the workaround doesn't show the save/cancel buttons. (And particularly I am interested in getting this working with a table, or at least with the manual trigger example and I am not able to get this workaround working with this use cases).
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.