ellykits / neat-form

Build form on Android using JSON schema; also includes view validation and skip logic.
Apache License 2.0
67 stars 28 forks source link

Recommendation for usage #110

Closed sombhattacharyya1983 closed 3 years ago

sombhattacharyya1983 commented 3 years ago

Hello, I am evaluating solutions for use to fill up forms on android.

My needs are the following, I need to be able to define the forms on a backend and the app should pull the definition down and display the forms based on that. I want there to be a way of defining dependencies in fields making up the form. So if there is a condition that field2 should be displayed when field1 is answered as 'Yes' then the UI should parse that and display accordingly. Some of the form fields also need to be signature captures and file(images) uploads.

Is this use case a good fit for neat-form ?

ellykits commented 3 years ago

Hello Shankar. Thanks for your email. To answer your questions, yes, your use case is within the boundaries of neat form. However the 2 widgets (image uploader and finger print scanner) are not yet supported at the moment.

The library is however extensible and the required widgets can be integrated. Another option that can work (if you already have the views and do not want to wait for the widgets to be added to the library), is to implement the view interface on your custom views then register your views with the Form Builder. Documentation on how to use custom views is on the Wiki.

As for rendering form from a schema obtained from the server, yes that is also possible. You can download the JSON, save it to your local database then pass it to the form builder whenever you want to render the views, provided the JSON can be interpreted by the form builder.

Neat form uses rules engine to handle skip logic (hiding or showing views based on provided conditions) at the moment the rules are defined in a YAML file that is added as app asset. There are plans however to make this more configurable like the forms. Documentation on how to handle skip logic is available in the GitHub wiki.

In case you need further clarification, feel free to reach out.

Thanks and regards.

On Thu, Dec 10, 2020, 2:58 PM Som Shankar Bhattacharyya < notifications@github.com> wrote:

Hello, I am evaluating solutions for use to fill up forms on android.

My needs are the following, I need to be able to define the forms on a backend and the app should pull the definition down and display the forms based on that. I want there to be a way of defining dependencies in fields making up the form. So if there is a condition that field2 should be displayed when field1 is answered as 'Yes' then the UI should parse that and display accordingly. Some of the form fields also need to be signature captures and file(images) uploads.

Is this use case a good fit for neat-form ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ellykits/neat-form/issues/110, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGM667AIEJQ42UG5IIJ3NQTSUCZX7ANCNFSM4UU5GJZQ .

sombhattacharyya1983 commented 3 years ago

Ah thanks thats a great relief. Thak you for the detailed response. This greatly helps. Also is it possible to define rules to conditionally display fields based on another field on a form ?

ellykits commented 3 years ago

Yes it is possible. If I get what you mean say, you have an input field for specifying the age and then you only want to show another field if say the age is greater than 18, that can be done. One more thing you are not only limited to using rules to handle skip logic, you can also perform complex calculations and return results with the form data.

On Thu, Dec 10, 2020, 8:43 PM Som Shankar Bhattacharyya < notifications@github.com> wrote:

Ah thanks thats a great relief. Thak you for the detailed response. This greatly helps. Also is it possible to define rules to conditionally display fields based on another field on a form ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ellykits/neat-form/issues/110#issuecomment-742680429, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGM667C6DWQEQLMWBNJ5BOLSUECFHANCNFSM4UU5GJZQ .

ellykits commented 3 years ago

PS we can move this discussion here https://github.com/ellykits/neat-form/discussions I will respond to your questions and requests plus it will be easier to track.

Thanks Regards

On Thu, Dec 10, 2020, 9:02 PM Elly Kitoto ekitoto@ona.io wrote:

Yes it is possible. If I get what you mean say, you have an input field for specifying the age and then you only want to show another field if say the age is greater than 18, that can be done. One more thing you are not only limited to using rules to handle skip logic, you can also perform complex calculations and return results with the form data.

On Thu, Dec 10, 2020, 8:43 PM Som Shankar Bhattacharyya < notifications@github.com> wrote:

Ah thanks thats a great relief. Thak you for the detailed response. This greatly helps. Also is it possible to define rules to conditionally display fields based on another field on a form ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ellykits/neat-form/issues/110#issuecomment-742680429, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGM667C6DWQEQLMWBNJ5BOLSUECFHANCNFSM4UU5GJZQ .

sombhattacharyya1983 commented 3 years ago

Super cool. I am sorry I did not notice the discussion option before. Thank you very much I will close this and any further question I will pose there.

ellykits commented 3 years ago

No worries 🙂 GitHub Discussions is a new feature that is still on beta but will be great place to ask questions, share ideas and engage with contributors.