Buy Now
Sign in

Edit and delete ability

samoht , November 03 2008, 21:28
S
samoht 275
November 03 2008, 21:28 #16498
hello,


I started working with ChronoConnect - and got as far as having the table display plus I added this in the editor so that I could edit the names of each referral:


    <?php
$editor =& JFactory::getEditor();
?>

<table>

<tr>

<td>Name:</td><td><input type="text" name="display_option" size="100" value=""></td>

</tr>



</table>

<input type="hidden" name="id" value="">




However, this only allows me to add new entries. What do I need to do to be able to edit entries already made and delete unwanted entries??

thanks
admin 28
November 03 2008, 21:37 #16500
Hi, do you have a primary key field at this table you are connecting to ?

Max
Max
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
S
samoht 275
November 03 2008, 21:58 #16501
yes,

list_id is the name of my primary key
S
samoht 275
November 03 2008, 22:00 #16502
here is my table structure:

--
-- Table structure for table `jos_vm_heard_about_us_list`
--

CREATE TABLE IF NOT EXISTS `jos_vm_heard_about_us_list` (
`list_id` int(11) NOT NULL auto_increment,
`display_option` varchar(50) default NULL,
PRIMARY KEY (`list_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='heard about us list' AUTO_INCREMENT=14 ;
S
samoht 275
November 04 2008, 01:20 #16507
Quick question about format and parse problem.


I have this in my query:

SELECT FROM_UNIXTIME( cdate, '%Y-%m-%d' ) AS dater
FROM `jos_vm_orders`


Chronoforms or joomla doesn't like the '%' - but that is the proper sql - so what should I do??
GreyHead 64
November 04 2008, 09:42 #16518
Hi samoht,

That syntax works OK for me. If the error message is showing up around the %Y then the problem may be the quotes. Sometimes MySQL is very fussy about the type of quote. Try using back-ticks` ` or double quotes instead of single quotes.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
S
samoht 275
November 04 2008, 13:01 #16530
Thanks BOB!

yes, double quotes worked - single quotes were a no go.
Anyway, any thoughts on the edit / delete capabilities??
Do I need to purchase the licensed version of chronoconnectivity to do this?
GreyHead 64
November 04 2008, 13:04 #16531
Hi samoht,

Glad that worked :-)

I'm not sure about licensing, Max knows all about that. I think that any version of ChronoConnectivity will let you edit tables in the backend. Click on View Data and you can do it all.
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
S
samoht 275
November 04 2008, 13:23 #16533
That is what it seems like, but if I try to delete an entry - nothing happens. If I try to edit an entry I don't edit the entry but add an entirely new entry?
admin 28
November 04 2008, 14:24 #16539
Hi samoht,

to edit an entry you need to have this in your html:

<input type="hidden" name="list_id" value="">


I'm not sure why you can't delete though, wait for the coming release in the next 2 or 3 days.

Cheers
Max
Max
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
S
samoht 275
November 04 2008, 14:44 #16544
Hi Max,

I did have that in my "Record Edit Template: " in the Admin Config - is that what you mean by in the HTML?
or do I need this in another spot too??
admin 28
November 04 2008, 22:50 #16564
yes I mean in the record edit template, at the code above you have only name="id" not name="list_id"

Max
Max
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!
S
samoht 275
November 04 2008, 22:57 #16567
oh, your right... I changed that when I noticed the inconsistency - but still no dice
admin 28
November 04 2008, 23:00 #16569
I have no idea why it doesnt edit then, wait for the coming release and retest, I have fixed somethings but it was editing fine before any fixes.

Cheers
Max
Max
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!