kelp404 / angular-form-builder

Drag and drop to build bootstrap forms in AngularJS.
http://kelp404.github.io/angular-form-builder/
MIT License
599 stars 340 forks source link

Remove previously created form elements #103

Open kamleshpawar2006 opened 7 years ago

kamleshpawar2006 commented 7 years ago

Hello,

I am using this library and works fine , but i am facing a issue when i try to create a form after creating one form, means, if i have already created a form on a page whose state say; http://locahost/example/#/newForm and after this when i go to another state say; http://locahost/example/#/formList and now if again i create a new form by going to http://locahost/example/#/newForm state then the page shows previously created form components.

How can i remove old form components.

I am using <div class="fbbuilderDiv" fb-builder="default"></div> for form building, and, <div class="previewdiv" ng-model="input" fb-form="default" fb-default="defaultValue"></div> for preview

Now how can i flush old form data?

i tried $scope.default = [];

But its not clearing the old form elements

Thanks in advance

kamleshpawar2006 commented 7 years ago

i tried this $builder.forms.default; but this is clearing further form data that i am storing into db

rajansharma3097 commented 4 years ago

Hi @kamleshpawar2006 ,

I'm also facing the same issue. Can you please let me know how you solve this problem.

Thanks, RJay