Closed amodpandey closed 7 years ago
I don't think this is supported. Maybe you can do something with an ng-if to setup an editable-form for create and then create individual editable elements for edit.
@amodpandey did you ever figure out a solution to your problem?
I did something similar but not exactly the same. Created a save button that works for create and update. I was happy to keep the create mode with editable links rather than form mode (but I could achieve this as well).
My solution won't work when we disable accessing scope from dom element (done in production)
function validateFormSubmit() {
var status = true;
var editables = document.querySelectorAll('[onbeforesave]')
for (var i = editables.length - 1; i >= 0; i--)
{
var scope = angular.element(editables[i]).scope();
if(scope.$editable.onbeforesave() !== true) {
scope.$form.$show();
scope.$form.$submit();
status = false;
}
}
return status;
}
With above I could achieve
OK, thanks for your comment. Did you want to close this issue?
sure.
@eugef can you close this issue?
I want to create a single form for create and update. When the form opens in create mode I want to show all the inputs editable (like the way when we click on edit). Similarly if I open the form for update (backed by exiting data) I want each input to be individually editable on click. In both cases the Save will update model and call backend API. Is this supported?
Do you have a forum where the authors look into and attend to questions? I did't see reference on the page.
Thank you