Forums

insert into & update functionality?

EFORCE 12 Aug, 2008
Hello,

I love Joomla and really love the chronoforms component. Can someone show me a sample chronoform that would demonstrate how to create a form with 'update', 'delete' capabilities. My example:

table: chonoforms_4

fields (not including the default chronocontact fields: username, name, email, favoritecolor

The user would login, goto this form and either add a record if none exist or update a record that already exists.

I know how to populate the fields with username, name and email using the getUser() method but I'm not sure of how I would use the chronoforms backend to have the data either be updated or added.

I am very familiar with SQL syntax for various queries but I am quite discombobulated when it comes to the Joomla syntax as it relates to this component.

Thanks,

Eforce
Max_admin 12 Aug, 2008
Hi Eforce,

Chronoforms V3.0 BETA 2 will come with this by default, I'm currently finalizing fixes and will put it online soon!

at the beta 2 you will only need to supply the form with the record id to update and the record will be updated or don't supply one and a record will be added, deleting recording is as easy as 1 line of code like this : $row->delete; the new version can write/update more than 1 table at once too!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
EFORCE 13 Aug, 2008
Thanks Max,

I just downloaded and installed the latest version and I must say it is pretty squared away. You stated something with regards to supplying an id. I'll fool with the newer version some more tomorrow but where are you referring to with regards to your comment regarding supplying an id to the form? I'm really looking forward to the upgrade.

Thanks!

Eforce
Max_admin 13 Aug, 2008
Hi Eforce,

the new version will get the form connected with some tables, and so, upon form submit, some code will be executed, if you supplied some value for the primary key of the table which the form is connected to, then a record with this key will be updated by other values submitted assuming they have the same table columns names, if the primary key posted is empty or even doesn't exist the a new record will be created!

this will allow both Chronoforms and ChronoConnectivity to be used together in a very powerful Joomla applications very easily!

this will be at V3 BETA 2, this is finished but I'm trying to fix some layout bugs with the other parts!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.