• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: populate form with data from previous submission

populate form with data from previous submission 12 years 7 months ago #18900

  • azelter
  • azelter's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi All,
Is there any way to populate a form with data from a previous submission of the same form?

I see information about how to DISPLAY data from one form in a second form and that has proved straight forward. What I want to do is populate the actual values of a form, using data from a previous submission of the same form.

I am half way there at the moment, but the process is getting very convoluted and I am wondering if there is either an easier way, or if this is a function that RSForm! Pro is planning to introduce in the future.

Any help would be much appreciated. For details readon ...

Basically I have a long form that people have to fill in to report specific activities. Often they need to fill it in for several activities which differ only in minor ways. In these cases it will save the users ALOT of time if they can use a previous submission to pre-populate the form.
The way I am going about this is by using the RSForm! Pro 'View Submissions' feature to allow them to search for the relevant previous submission. That works great. I then have some code in the 'Details Layout' that generates a link from the already existing submission and points to the new form as described here:

www.rsjoomla.com/support/documentation/v...-different-form.html

My issue is that it is not so much that I want to display this information, which is relativly easy, but that I actually want to populate the form with that information. For some form components (like a textbox) that can be done relativly easily by simply filling in the default value as {FieldName:value}. The problem with this is that when the form is pulled as an empty form (rather than from the link generated from my 'View Submissions' option) the textbox in question will contain "{FieldName:value}" as the default value, as there was no real value for that parameter.

Also, for things like check boxes and radio buttons, much more complex coding would be required to set them to the right values based on the previously populated forms values.

Thanks for reading this far! Any help or ideas appreciated.
Last Edit: 12 years 7 months ago by azelter.
The administrator has disabled public write access.

Re: populate form with data from previous submission 12 years 7 months ago #18960

Hello,

If I understand correctly you want to Pre-Populate fields with the values from the database, with the information of the last submission.
I would say you use SQL coding to select the top row of the table and use the values for that row.

SQL example
www.rsjoomla.com/support/documentation/v...st-from-a-table.html
Regards
Wilco Alsemgeest

Please note: my help is not official customer support. To receive your support, submit a ticket by clicking www.rsjoomla.com/my-support-tickets.html
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!