Giter Club home page Giter Club logo

Comments (6)

mmaask avatar mmaask commented on August 13, 2024

Very vague description for me, could you explain a bit in more detail?

from angular-form-gen.

runnerman261 avatar runnerman261 commented on August 13, 2024

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
image
Hope this clarifies the question.
Thank you for taking the time to respond.

from angular-form-gen.

mmaask avatar mmaask commented on August 13, 2024

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.

runnerman261 avatar runnerman261 commented on August 13, 2024

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.

mmaask avatar mmaask commented on August 13, 2024

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.

runnerman261 avatar runnerman261 commented on August 13, 2024

Thank you very much for taking the time to respond to my question.

from angular-form-gen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.