formio / ngFormBuilder

The Form.IO Form Builder Application
http://formio.github.io/ngFormBuilder/
MIT License
130 stars 130 forks source link

how to give dummy values to angular formio form #449

Open swkasi535 opened 4 years ago

swkasi535 commented 4 years ago

I have created a username and password with submit button page using formio builder and I have shown in the page by taking that script from the database. The page is visible now. On this rendered page I want to show a dummy username and password when clicked on a button.

Basically I want to access the username and password in the angular component and I need to modify them. Eg:- In angularJS, we can access that with ng-model like $scope.ngModel. And In angular formio how can we access that in a component.

I can achieve the same in html it self.

<formio [form]="obj"[submission]='{ "data": { "userName": "Joe", "password": "Smith" } }'>

But I need to achieve this from angular component.

swkasi535 commented 4 years ago

is anyone looking into my question, I am new to github.

randallknutson commented 4 years ago

Hi @swkasi535,

You should be able to get the formio instance from within the AngularJS component. Then you can set form.submission = {} and it will update.

To answer your question about issues in github, we typically try to point people in the right direction whenever we are able to. The community is also welcome to chip in and help out with any issues people report. For more in depth support we offer paid support which can be purchased by contacting support@form.io.