Forums

Update previously saved form

zerocool 07 Apr, 2009
Hi everyone,

I would like to know if it is possible to edit a form previously registered (like a profile).
I have a form that is linked with a Joomla table but I can't find any way to give the possibility to the user who fill the form to update it later.

I hope this was clear enough... thanks in advance for any help.
GreyHead 07 Apr, 2009
Hi zerocool,

It's possible but not 'automatic'. You need to add code to look up the users previous results and then put them as values in the Form HTML.

Bob
zerocool 07 Apr, 2009
Hi Bob,

Thank you for your reply. I assume I shall use the "profile plugin" after an identification step. But will this create a new entry in the database each time someone update his profile or update the correct entry ?

Thanks again for your reply, I'll explore this solution tomorrow.

Olivier
GreyHead 07 Apr, 2009
Hi Olivier,

Personally I'd use DB Connection to link to the table and make sure the Input Field names and Database Column names match up. If you put the User Id in a hidden field then the ChronoForms Autogenerated code should update an existing ID or add a new one. (It actually uses some standard Joomla DB code to do this.)

Bob
zerocool 07 Apr, 2009
Dear Bob,

Thanks a lot, I'll try this tomorrow.
zerocool 09 Apr, 2009
Hi Bob,

I finally did it with the help of the chronoconnectivity component.
Everything seems fine.

Thanks again for your help !
kendall 22 Apr, 2009
Do you mind sharing details of how you accomplished what you were looking to do? I have a form that I would like different users at work to be able to fill out to track trailers of product. The process sometimes takes a while from start to finish so I would like to give them the ability to go back and update the record with more information as it becomes available. I have the form setup already and a database with all corresponding fields for each option. Basically, the one piece of information that will be required to create a new entry in the database will be a serial number found on a physical purchase request. From then on I want them to be able to edit the entry and add new information at each phase using the document serial number that the process originated with. To give you a better idea of the process, here is a link to the form:

http://kendallrbrown.com/index.php?option=com_chronocontact&chronoformname=Styro

Thanks,
Kendall
GreyHead 23 Apr, 2009
Hi Kendall,

This looks like a good Ajax application - pre-load the Req numbers, then when they select one use an Ajax query to get the specific information.

Otherwise you could do it as a two step form where the first step gets the Req and then the form is re-displayed with the detailed info. Search for dyerdyerdyer's recent thread for a conversation on this and some code.

Or indeed ChronoConnectivity will work but is probably not the best suited solution for this.

Bob
kendall 23 Apr, 2009
Bob,

Thanks so much for the quick response. To be honest, I don't know much at all about coding in Ajax. I read through the forum posts that you suggested. I somewhat understood what was going on, but not enough to know where to insert all of the code and modify it to fit my specific example. I'll break down my exact setup for you as much as I can. I am not sure how fitting the two page suggestion is. Here it goes...

First off, here is a screen shot of the form with field names inserted to map things out.
http://kendallrbrown.com/images/TrailerTracker.jpg


Step 1

I'll be entering the Purchase Requisition Serial Number (select_2) by adding an new Option using the Form Wizard every time I submit a physical Purchase Requisition to our Accounting team.

Step 2

Once I add the new Purchase Requisition Serial Number to the Options text box in the Form Wizard, I will save the form so that I can now use that Serial Number to create a new entry on the front end.

Step 3

I will access the form at http://kendallrbrown.com/index.php?option=com_chronocontact&chronoformname=Styro to create a database entry with as much information as I have at that point in the process. This would typically include the Purchase Requisition Date (date_13), Product SKU (text_5), QTY Requisitioned (text_6), Unit of Measure Requisitioned (text_7). To submit this information a selection from the Purchase Requisition Serial Number (select_2) drop down will be required. All other information is not required as it is not always available.

Step 4

I hand the physical copy of the Purchase Requisition to a woman I will call Candice. Candice will then fax the physical copy to our corporate office, write a Purchase Requisition Number on the physical copy (different from the Purchase Requisition Serial Number) and write a Purchase Order Number on the physical copy.

Step 5

I get a carbon copy of the original physical Purchase Requisition that I had given to Candice with the numbers she wrote on it in Step 4.

Step 6
I access the form again at http://kendallrbrown.com/index.php?option=com_chronocontact&chronoformname=Styro and select the corresponding Purchase Requisition Serial Number (select_2) I wish to add information to. After selecting the appropriate number from (select_2) the form should query the database and fill in the information it already has into all of the corresponding fields in the form. (I suppose it should be set to ALWAYS do this, so that in Step 3 I can make sure I have not selected the wrong Purchase Requisition Serial Number) This way the user can see what information has already been entered, correct any mistakes and fill in any missing information. Once they have made changes to any of the fields and hit submit, all of the information in the record should be overwritten with the new values for all fields. Naturally, the (select_2) field would just be a reference as to which record should be overwritten.

Step 7

Step 6 would be repeated as many times as necessary by the user until all of the information gathered at different points in the process is complete.



Hope this helps. The database table is named jos_chronoforms_Styro. I created the table using the Create Table tool in the Forms Manager. Here is a screen shot of my database http://kendallrbrown.com/images/Database.JPG


Thanks,
Kendall
GreyHead 26 Apr, 2009
Hi kendall,

I'd merge steps 1-3 by having a 'New Req' option on the drop-down. If new Req is selected then your form has blank fields, if there's a Req # then the exisiting data is pre-loaded.

Other than that this is a fairly straight-forward two-step form. Step 1 select the Record ID, Step 2 edit & save the info.

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