possible to edit data in existing CB fields via ChronoForms?

JamesS 05 Feb, 2009
I'm still new to Joomla and ChronoForms but learning. My question relates to including Community Builder fields in ChronoForms:

Is it possible to not only show CB fields in a form, but show previously entered CB profile data that can also be edited?

We have many existing users with limited info in their profiles. When they sign up for a new event, we want them to:
1. enter new data into fields they didn't see when they first registered
2. update any out-of-date/incorrect info

For example, we generally only capture name and email upon initial registration. But when they sign up for a class, we now need their address and educational background.

I'm pretty sure we can show their pre-populated name and email in ChronoForms. But can the user change their email and add data to the new fields?
Max_admin 05 Feb, 2009
Hi James,

you can but you need to be very careful, one mistake may make problems, to enter or edit data in some table you just need to connect to it in the DB connections tab, to edit some existing record, you need to have a hidden field in your form with the same name as the the primary key field name in the table, and it should be loaded with the record value!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ranjeev 20 Feb, 2009
Since chronoconectivity does not have validation built in record edit template. I need users to update their record with chronoforms validation. Can you extend what you meant by hidden primary key. Is it the 'id' field in the comprofiler table?
Max_admin 20 Feb, 2009
Hi ranjeev,

you can add the validation to the connectivity with a hack or you can wait for me to post a new version from the "profile" plugin which will allow editing records!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
lemur 16 Apr, 2009

... to enter or edit data in some table you just need to connect to it in the DB connections tab, to edit some existing record, you need to have a hidden field in your form with the same name as the the primary key field name in the table, and it should be loaded with the record value!

Max



I must update data in jos_comprofiler.

I connected to it in the DB connections tab.
In form HTML i have:
<input value="" id="id" name="id" type="hidden" /> // id is the primary key in jos_comprofiler

But i get after submit:


Tablecomprofiler::store failed - Duplicate entry '0' for key 1 SQL=INSERT INTO `jos_comprofiler` ( `id` ) VALUES ( '' )


What to do, please?


Thanks
GreyHead 16 Apr, 2009
Hi lemur,

I think you need to add the user id as the value of that field, if it is left as value="" then you will get this error (or something like it). You can either do this in the Form HTML or in the OnSubmit code after the form is submitted.

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