Base solution for your next web application
Open Closed

dynamic fields in the form #1636


User avatar
0
lynok created

I would like to know about creating dynamic fields in the form eg Account has field 1, field 2 and field 3 and the account B has field 2 and field 4, this part involves the Tenants part of the boilerplate, each client customizes the application the way you want ... does anyone know about it? Creating in AngularJS? any help is welcome!

Thank you


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Making it by yourself might be a bit hard. You can try third party libraries like this one <a class="postlink" href="https://github.com/danhunsaker/angular-dynamic-forms">https://github.com/danhunsaker/angular-dynamic-forms</a>.

    You can find more on the web.

  • User Avatar
    0
    lynok created

    It really is a little hard ! Thanks a lot for the help ;)

    If anyone has any more idea , thank you :D

  • User Avatar
    0
    apexdodge created

    Dynamic Content / Form Builder is definitely a hard task.

    For the database schema, your best bet is to follow what is known as an EAV pattern.. It has it's drawbacks (namely performance), but it is effective. EAV stands for Entity-Attribute-Value and you can read more about it here: <a class="postlink" href="https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model">https://en.wikipedia.org/wiki/Entity%E2 ... alue_model</a> and here is a good example of usage: <a class="postlink" href="http://programmers.stackexchange.com/questions/204097/dynamic-form-builder-forms-and-database-design">http://programmers.stackexchange.com/qu ... ase-design</a>

    An alternative is to use a NoSQL database for this type of storage, like MongoDb.

    On the client side, there are plenty of Angular approaches to showing a form dynamically. You can google search that fine. That's actually the easier part when it comes to all this.