Forums

Can form contents be retrieved and edited via the frontend?

Romuba 25 Mar, 2010
I have created a number of forms with Chrono and really like the component. Well done to all concerned!

I now need to have a form whereby once completed and submitted, and saved to the database can be recalled via a search field so that the conetents can be edited or deleted, all via the frontend in a form looking like the one used for capturing the data.

In short: People's information is captured today. Three months later they change their mobile number and address. I need to be able to all up the form and edit the fields and then save back to the DB.

I can't find any tutorials that deal with this. Can it be done?
GreyHead 25 Mar, 2010
Hi Romuba,

I think that the Profile plugin is intended to let you do this.

Bob
Romuba 25 Mar, 2010
I have searched teh site but can only find a Paypal and Multi language plugin. Also can't find any documentation in this regard.
GreyHead 25 Mar, 2010
Hi Romuba,

The plugins are installed with ChronoForms - see the left hand column in the Forms Manager.

Bob
Romuba 29 Mar, 2010
Found it immediately but took a while to discover that I had to switch it on in the plugins tab.

The very scant info doesn't really help me understand what I need to do. I have created the form and it accepts info, sends an email to various addresses and adds the detail to the database. No what do I need to do to call that info up again to edit via the same form or what?
GreyHead 01 Apr, 2010
Hi Ross,

Here's the info from the Help tab for the plugin:

The plugin allows you to read values from any table in the database and include them in your form.
It was originally designed to allow access to the jos_users table to create member profiles but it is capable of much more.
To use the plugin effectively you will need to call the form from a link on your site. This could be from - for example a list of users, or topics, or events where you have some related information in a database table.

* Choose the table you want to use in the first drop-down e.g. jos_users to get a user's name and email.
* Select a field or column name from the table in the second drop down. This should be a field that will uniquely identify the record you want to use e.g. 'id' or 'username' for the jos_user table. NB This drop-down will not appear until you select a table in the first drop-down.
* In the Target field name box put the name of the field you will use to identify the record e.g. user_id. You will need to add this field to a url calling the form e.g. . . . &chronoformname=my_form&user_id=99
* You can then use information from this record in your form by putting {column_name} where you want it to appear e.g. {name} for a users name from the jos_users table.
* Once this plugin is configured you must enable it in the Form 'Plugins'' tab.


Bob
Romuba 05 Apr, 2010
Bob

I have very carefully worked through the help info again and again etc. but I'm still not getting it. I have taken a screenshot of what I have done.[attachment=0]childinfo.png[/attachment]

The points I still don't follow are:

[list]In the Target field name box put the name of the field you will use to identify the record e.g. user_id. You will need to add this field to a url calling the form e.g. . . . &chronoformname=my_form&user_id=99[/list]
[list]You can then use information from this record in your form by putting {column_name} where you want it to appear e.g. {name} for a users name from the jos_users table.[/list]
I have gone over them repeatedly but really can't work out what and where I need to implement these instructions.

I'm sure that once I get it I will see it to be very simple but at the moment I'm seriously stumped!
GreyHead 06 Apr, 2010
Hi Ross,

Let's get the first part dorted and then the second may work anyhow.

You have a table stmatts_chronoforms_childinfo

That table presumably has a column (or columns) that can uniquely identify the record. You need one of those column names in the Target Field Name box.

(At present you have 'lastname', this could be unique but typically isn't, if there are more than one matching record you will get random results.)

The "'Request' Parameter Name" box identifies the name of parameter in the URL that will be used to match the column value. The name here doesn't have to match the column name -- it's the two values that wil be compared.

So let say that you have a 'child_id' column in the table; and you use 'cf_id' in the URL.

The profile plugin will look for &cf_id=999 in the URL and then get the record WHERE `child_id` = 999 from the database table.

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