McNull / angular-form-gen

Design Bootstrap based form schemas for AngularJS in a drag and drop WYSIWYG environment.
MIT License
135 stars 79 forks source link

Form is not rendered with a valid schema stored in a database and reapplied. #19

Open rashidansari05 opened 8 years ago

rashidansari05 commented 8 years ago

Hi,

I am facing an issue with form-gen while trying to apply an existing schema. I had stored the schema in my database to use it dynamically, but when I apply it doesn't work. The scenario is: I have used fg-tabs to show both Schema Editor and Preview. When page loads and the schema is applied it doesn't work, but as soon as I switch the tab to Preview and come back to Editor it works and the form is rendered with my stored schema.

Please help me out to solve the issue, I checked everything and don't see anything missing or incorrect, the schema is also valid one that's why it works when the tab is switched. I hope there is no dependency with tabs, and it can also work isolated without tabs.

Please let me know if more information is needed, I can provide my implementation as well. regards, Rashid Ali Senior developer

mmaask commented 8 years ago

Can you double check the force render property, could be that for the initial view it is set not to render initially. For example:

https://github.com/McNull/angular-form-gen/blob/master/src/app/demo/edit/form-edit-schema.html#L3

If it's not the case, then most likely the schema is loaded async and you need to delay the render from your side as the change is not boardcasted. You can verify that if you remove all the tabs and check if it renders without.

bravojohny91 commented 8 years ago

@rashidansari05 are you able to fix the issue for pulling json from db? I am scratching my head to show json from db, can you help?