Forums

How to get edit form option

am_soumya 06 Dec, 2012
Hello,

In my site I could make a form using chronoform and could save the form data successfully. But Now I want to provide three buttons like save to draft, preview form, edit form and submit button.

All the buttons have different functions.

1. Save to draft - should save the data in db table. If anybody saved the form earlier it should load the form with data on load.
2. Submit - will generate a pdf file with submitted data.
3. Preview - will redirect to a page with posted form data.
4. Edit form - should allow editing the submitted data.

I think, we can do all these by adding new event. Right? Please guide me to go ahead. I am using joomla 2.5.6 and chronoform J1.6_V4_


Thanks and Regards,
Soumya
GreyHead 06 Dec, 2012
1 Likes
Hi Soumya,

To save a draft version of your data I would just add a 'status' column to the table and change this to reflect the status of the record. The simplest version is 0 for draft, 1 for published but you might also want other values.

Max has a beta version of a PDF action that you can get by asking him using the Contact Us link above.

The Confirmation page action will let you display a page for review.

The normal on Load action with a DB Record Loader will show data for edit.

You can switch between different actions using my custom Event Switcher [GH] action. Please see this FAQ

Bob
am_soumya 07 Dec, 2012
Hi Bob,


Thank you so much!!!!!!!!!!!!. One more question, How do I associate different elements with different events?

For example: I need to go for a preview event while clicking on preview button. Now it is taking same submit event for all buttons.

Custom event switcher - I am not understanding the worflow.. Could you please explain it?

Thanks for your great support and great plugin!!!!!!!!!!!!!!

Thanks and Regards,
Soumya
GreyHead 07 Dec, 2012
Hi Soumya,

I suggest you get the Event Switcher and check the documents. You could use that with the Event Loop action to switch between events. BUT I doubt that you need separate events.

You can give the submit buttons different values to detect which one has been clicked after the form has submitted.

Bob
am_soumya 10 Dec, 2012
Hi Bob,

Thank you so much for your immediate replies and great support!!!!. It is highly appreciable. It got worked and met my requirement well.

Thanks and Regards,
Soumya
alan.bagley 22 Feb, 2013
Hi Bob,

I am after a very similar solution to this, but I need each user (registered member) to have access to a form that they can save and edit until the form is submitted, then the user can only see the data submitted but not edit the form.

More detail:
After a member has registered on the site, they can then see a form that they will need to fill out and submit. The form is for local business to gain funding from business owners that want to "invest" in a project or their company.

The issue may arise that a member is filling in details on the form that require further information that may not be to-hand and so they need to save the form and come back at a later date and finish off the application.

So is there away of allowing a form to be saved with user data that can be edited and submitted at a future date?

Kind regards
Alan🤨
GreyHead 01 Mar, 2013
Hi Alan,

I'd do this by adding a 'status' column to the database table, keep this as 'draft' while the data is editable, switch it to 'final' when the confirm that editing is complete.

Bob
This topic is locked and no more replies can be posted.