Forums

Form that perform Inclusion, Exclusion, Search ...

sdnina 07 Sep, 2009
Hi there.
I am new to CF and Joomla! too.
I need to make a form that include, delete, alter , list and print data into a DB.
I have created a form using Dreamweaver, copy HTML code generated and past it into the form code part called Main onLoad/View Code - Form HTML: (May contain PHP code with tags).
So far so good. It´s work very well to include into a table. ( all the table stuff was easy )

Now I have some big doubts.

1 – How I call my scripts for : delete a record, alter a record, search a record and display one or many records. All are in PHP. Because I can´t use the tag <form action=”alter.php”> inside Main onLoad/View Code - Form HTML: (May contain PHP code with tags).

2 - Were I should put all those scripts ? Can I copy inside the same space Main onLoad/View Code - Form HTML: (May contain PHP code with tags). ? or should be in somewhere at Joomla! directory?

3 – Each action should be in a different form, i e, one form to perform a inclusion, another to perform a exclusion, etc etc or it can be in one form with a set of buttons ( Include / Exclude / Alter / Search / List / Print )

Thank you very much for your attention

PS I made a seach into the forum and I didn´t find anything about.....

Sdnina
GreyHead 07 Sep, 2009
Hi Sdnina,

To add delete or alter a single record, you can use a single form.

Add PHP to the form to check if there is an existing record and pre-load these values into the input tag values.

If your DB table has a unique ID and there is an existing unique id in the form data the ChronoForms will update the table instead of entering a new record. Usually you embed the uid by using a hidden field.

To deal with searching and viewing lists of records you will probably be best using ChronoConnectivity which is designed for this.

Bob
sdnina 09 Sep, 2009
Hi,Bob

Thank you for your attention.

As a newby I just was hoping to view an entire application (or a model ) up and running somewhere. One CRUD ( create / read / update /delete )function for a single user's records.

I am browsing the forun for some example that do something like that but nothing yet.

Can you give me hand ?

Thanks

Sdnina
sdnina 17 Oct, 2009
Hi Bob,

I am still have some few question .....
You said " To add delete or alter a single record, you can use a single form. "
Ok, but for each button I need to create an onsubmit php code right ? Where a I can store this piece of code ? In a Joomla directory ?

I would like to use the same idea that was created for insert a new record to alter a single record. Where I can find this code inside of Joomla directory ?

In ChronoConnectivity the division Header, Body and Footer is the same idea that is for a HTML page ? Is necessary to create a form to use ChronoConnectivity ?

Thank you for your attention.

Sergio
GreyHead 26 Oct, 2009
Hi Sergio,

Add & Alter will work on a standard ChronoForm. If the form data includes an existing cf_id (or tabel primary key) then it will alter the record on save.

You would need some extra code to detect a deletion but it can go in the same OnSubmit box using and if clause.

In ChronoCommecticity Head, body and foor refer to the table used to dsiplay the records.

You don't need a form in ChronoConnectivity unless you want to edit record - but the CC setup may require you to link to a form

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