[Datepicker] Add form elements dynamically in Mobile App

[Datepicker] Add form elements dynamically in Mobile App

  
Forge Component
(14)
Published on 2014-11-17 by Hugo Pinheiro
14 votes
Published on 2014-11-17 by Hugo Pinheiro

I have to provide facility to user to add/remove some static input text on form as shown in image. I don't have to bind form with any entity. I have to use structure to store entered data.

Also I have to accomplish below task. 

In Subcontractors fold, I have to fetch subcontractor name from local entity and bind 3 more input text fields with every subcontractor to enter relevant time sheet for respective subcontractor.


Finally user have to click on save button to store entered data in local entity in JSON format. Please provide feasible solution for same.

Thanks in Advance!  

Hello Arvind,

What did you try so far?

Cheers.

Eduardo Jauch wrote:

Hello Arvind,

What did you try so far?

Cheers.

I need proper approach to save my time. Hope anyone can give best idea for same. 


Hi Arvind,

This forum is meant to provide help for those that are trying to develop, and are stuck at a certain specific topic. It's not meant for soliciting full solutions to a problem.

@Eduardo: I'm disappointed you didn't link to your excellent article about asking questions :).

Hi Kilian,

Thanks for your reply. 

I developed many things in Web application & running successfully, but having less experience in mobile app development, although I have developed few things in mobile too. Just looking some good way to start with this task, not soliciting full solution for the same. I did same in web application using editable widget, but in mobile there is no similar widget to accomplice this task. I know that, need to apply own logic & do custom coding, You guys are expert in OS, henceforth posted this problem on forum, instead of going wrong way & wasting time.

Hope you understood my concern. I'm not sit ideal, doing with this task to get solution asap. Your support will be truly appreciate.


Thanks

Arvind


Solution

Hi Arvind,

Thanks for the reply. As for your first question about the Form, you don't need to use an Entity, any Structure will work fine. If you have a Local Variable of the specific Structure type, just drag it onto a Form and Service Studio will create the Inputs.

As for the second question about a subcontractor, if the three more inputs are not in the Entity, you can either manually add the Inputs inside the Form, or if you have them in a Local Variable, just drag the Local Variable onto the Form, and again Service Studio will create the Inputs for you.

As for the third question about storing the data, why do you want to store it as JSON? Why don't you use a normal Local Entity (or multiple Local Entities)? You can always convert it to JSON later if you so must, but storing JSON in the database is very inefficient. I would very much advise against it.

Solution

Hi Kilian,

Thanks for your fruitful reply. Now I'm able to proceed and achieved few subtask of my task. Still I'm looking to add static input text dynamically in Form.If you have some good idea, kindly share with me.

I'll discuss with my product owner reg. Entity (because OS having limitation to total number of object) to store data in entity instead of storing in JSON format.