Comments (6)
Very vague description for me, could you explain a bit in more detail?
from angular-form-gen.
Here is what we are trying to do - We want to use the form designer to allow users to design a form based on a database schema. Assume the DB has the following fields "Text1", "Text2", "Text3", "Number1", "Number2", "Number3".
When i drag and drop a text field into the canvas and go to Configure ->Properties, i would like to make the "Name" property a dropdown that shows Text2, Text2, Text3. This way we clearly know which field in the DB the text field maps to.
Here is a screen shot of how it would work
Hope this clarifies the question.
Thank you for taking the time to respond.
from angular-form-gen.
I really don't see point in doing that. You couple your database to the internal structure of the form. There actually shouldn't even be the name field at all, it should be hidden and the value stored as random values because it is only used internally thus there is no reason to change it at all.
I have hidden name field for my text fields and radio/checkbox options all together, if you are not the only one using the application and someone decides to change the internal name on some form that already has records then you're gonna have a bad day.
from angular-form-gen.
Ok, thanks for the suggestion. I could couple the db to the internal structure of the form.
Since i could not find any direct documentation on hiding the "name" field, how would i hide it from the user when the click on the "configure" button.
from angular-form-gen.
You would have to fork/clone the repository, edit the code and build new distribution package. This project has one of the best written codes I have ever seen. It can be extended so easily as I've added many new field templates myself and done changes to my needs.
To do that you would need to edit the particular template file under 'field-templates' directory. For regular text field it is https://github.com/McNull/angular-form-gen/blob/master/src/angular-form-gen/field-templates/properties/text.ng.html -- here you simply would have to remove fieldname: true from the object and you're good to go :)
from angular-form-gen.
Thank you very much for taking the time to respond to my question.
from angular-form-gen.
Related Issues (20)
- Help needed
- Angular 1.4 errors HOT 4
- Layouting HOT 2
- Form is not rendered with a valid schema stored in a database and reapplied. HOT 2
- No margins between fields HOT 4
- bootstrap datepicker issue HOT 3
- Rows and Columns HOT 3
- Fetch json from database HOT 1
- Creating dynamic user created tabs with the use of ng-repeat HOT 1
- how to add dynamic css to the field properties
- tab pane active through code
- How to call add method HOT 2
- is this maintained?
- Not an issue: Any idea on how to convert the form genererated (with data) to pdf? HOT 1
- How to inject ngdialog into fgSchemaController
- Split Angular-form-gen.js
- Will this be implemented in Angular 4 HOT 2
- View not updated
- Is there any to attach Image to a form ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-form-gen.