Dynamic Form Submit (nested form?)

I am creating a form that collects a couple fields for a “Job”. Once all those fields are added, I want the user to have the ability to add that job to a list of jobs, and then re-fill the form to add data for a new job, that way they can submit multiple jobs in one session. I am new to developing on open ondemand and only see conditional logic being used for individual fields. Does anybody have advice on how to use dynamic fields to do this?

I’m not sure I follow the use case, but I would guess we don’t support that. Forms that submit jobs and the interactive cards that are generated after they submit are 1:1 in terms of jobs:forms.

That is, 1 form submits 1 job. Or at least that’s what we’ve built for/anticipated.

Can you describe the use case a little bit more? What information are you passing from one job to another? Again, I’ve never really anticipated this desire to chain jobs together through the forms, so I’d like to understand what problem you’re trying to solve.

Sure, the form requests particular attributes for a job, which is essentially some necessary metadata (ex: source) for a large data upload/transfer. We already have a package to do this transfer, but want a GUI to make it easier for users. Our package supports multiple jobs in one session so we would like the form to have similar capability so that essentially, one “job” for the form would run the list of user-input jobs to our transfer package.

Expected use case: After the user inputs data for one transfer job, they can click an “Add Job” widget that would essentially re-render the form. Then, once they click “Submit”, the list of transfer jobs would be submit as 1 job for our data transfer package to take care of.

Let me know if this clarifies things.

UPDATE: This may not be necessary. I think I’ll add a widget to allow users to upload a csv file with multiple rows for each job instead of this

I see - the job that you submit through OnDemand that subsequently issues a bunch of other - for lack of a better term - jobs. Re-reading your initial comment with this explanation - I get what you’re initially trying to do and I don’t think there’s an easy way to do this. Possibly with the data-set directives - but you want to do something more like data-add-to which we don’t really have.

File upload seems fine but I’d also suggest a text_area for multi-row text input. This will be the same as the input file - but it will be cached so that the next time you open the form, the previous value is already populated there. With an upload file I suspect you may have to upload the file every single time you want to submit the job.

https://osc.github.io/ood-documentation/latest/how-tos/app-development/interactive/form-widgets.html?highlight=text_area

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.