Problems, need help? Have a tip or advice? Post it here.
14 posts Page 1 of 2
Hello all!

I am wanting to create a DBF that has the option of temporarily saving the details filled in. And once the details are completed the form can be submitted. Also the form is a multi-step form for which i am referring viewtopic.php?f=2&t=7134 (if there is any other resource available please point me to it, I shall be really thankful.

Use Case Scenario:
The client wants to fill a form during inspection. Every individual has to do minimum 5 inspections per day. So when the inspection is underway and due to some reason the Inspecting person cannot fill in the form he will create a draft form (can be multiple drafts) and then complete the forms one by one once he has the time to do so.

How can that be done?

Regards,
Image
where innovation meets technology
Just thinking out loud here....

Isn't it easier to make a couch form for those inspections and let the user print/save those as pdf when they are done?
I load frameworks and write bugs on top of them, after that I rearrange the code so that it looks like a cool product.
@Tomarnst,

The forms are for inspections only, which will be filled in by the respective inspector (after logging in) and a report will be printed at the month end (also the final form will be saved).

But the form is a multi-step form. And need not be that all the steps can be completed at once, so they need to be saved as a Draft and then upon completion the inspection form will be finally saved. So the draft is an additional and required intermediate step.

Regards,
GenXCoders
Image
where innovation meets technology
Yeah I understand .. or maybe I don't understand your problem

Whats holding you back on creating a couch template and print or save it when needed.

I have about the same structure for quotes - orders - invoices. Quotes are not complete filled-out Invoices. I use the couch folder structure for it like:

template - orders

Folders:
    - quotes
    - orders
    - invoices
    invoices - open
    invoices - closed

So a client has a request we create a quote ( save in quotes folder ) ... client comes back need some adjustments like more/less products we edit the quote, after ok from the client we move the quote to the orders folder, if for some reason the template need extra fields here it's quite easy to adjust it with an if statement. Finally if everything is fine we move it to the invoices- open folder (again adjusting the template with some if statements). Client has paid the invoice we move it to invoices-closed. At every step we can save the form as an PDF.
I load frameworks and write bugs on top of them, after that I rearrange the code so that it looks like a cool product.
Pretty much what i am wanting to do.
You have got my problem.

Just like Quotes and Orders, I need to have Drafts and Submits.

Now my issue is, how to do it. Specifically, how to do:
after ok from the client we move the quote to the orders folder

this movement thing?

Regards,
Aashish
Image
where innovation meets technology
I'm doing this out of my head now.

but i believe it is ...

<cms:db_persist_form k_page_folder_id='to whatever the id of the folder is' />
I load frameworks and write bugs on top of them, after that I rearrange the code so that it looks like a cool product.
@Tomarnst I would want to give it a try
Tomarnst wrote: I'm doing this out of my head now.

but i believe it is ...

<cms:db_persist_form k_page_folder_id='to whatever the id of the folder is' />


But currently, I have two DBF templates and no folders what do you suggest i must change. Both forms need to have the Draft facility.

Regards,
GenXCoders
Image
where innovation meets technology
Hi,

I think you should merge them into one template and create those folders.
I load frameworks and write bugs on top of them, after that I rearrange the code so that it looks like a cool product.
I cannot have the two forms (templates) merged as they serve different purposes.

Nevertheless i can surely add folders (statically or dynamically) to each template.

As you suggested, would it be better to code the folder thing, then have another template with a draft folder. And before submitting the form an option (dropdown/radio button) can be given whether to save the template to draft or to the folder it belongs.

Would the code you proposed do that? Frankly speaking i have not given a try to the code you suggested coz i was implementing a different functionality.
Image
where innovation meets technology
I do not fully understand the current situation, what goes where (frontend, backend), but maybe a single checkbox/radio would suffice? For instance, one can bear a name "is_draft" and if user prefers to save it as draft, then checkbox checked.

Listing only such drafts in the front-end is equal to filtering pages with custom_field="is_draft=1".
14 posts Page 1 of 2
cron