Buy Now
Sign in

Edit An Existing Record?

RobEnd , October 18 2008, 14:35
R
RobEnd 4
October 18 2008, 14:35 #15570
Hello,
First off thanks for this component, it looks very promising and fills a gap in Joomla components. I'm a newb and find it hard to believe how few components there are for managing data. I was hoping to find something like MS Access with a "publish to website" button. But then I'm idealistic..

I followed the tutorial and made the admin edit record template. It displays my data fine but when I click on a field name I get an empty edit page. If I type data in I can save it and add a new record. Deleting is easy too.

What I cannot work out is how to edit an existing record. What I would like to see is a button at the top "Add New Record" for adding records, and clicking on an existing record opens it for editing. The link shown when I hover on a record reads.../index2.php#edit_data - surely it should be something like index2.php#edit_data&ID=2

btw - I doubt if it matters, I use the JCE editor.

Cheers,
Rob

<?php
$editor =& JFactory::getEditor();
?>
<table>
<tr>
<td>title:</td><td><input type="text" name="title" size="100" value=""></td>
</tr>
<tr>
<td>ID:</td><td><?php echo $editor->display( 'ID', '' , '100%', '350', '75', '20', false ) ; ?></td>
</tr>
<tr>
<td>catno:</td><td><?php echo $editor->display( 'catno', '' , '100%', '350', '75', '20', false ) ; ?></td>
</tr>
<tr>
<td>price:</td><td><input type="text" name="price" value=""></td>
</tr>
<tr>
<td>published:</td><td>
<select name="published">
<option value="0">No</option>
<option value="1">Yes</option>
</select>
</td>
</tr>
<tr>
<td>ID:</td><td>
auto-increment
</td>
</tr>
</table>
<input type="hidden" name="ID" value="">
admin 28
October 18 2008, 22:14 #15572
Hi Rob,

When you add on the link of some record, a new page open,s what can you see there ?

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!!
R
RobEnd 4
October 20 2008, 10:41 #15628
Hello Max,
if I click on ID, title or catno I just get a blank page, all the fields are listed but they are empty.. What confuses me is I cannot see where the data is passed onto the edit page. I was expecting to have to do something like this:

<input type="text" name="title" size="100" value="title"></td>


I'm happy to pm you my log in details if you have time to take a look yourself.

Thanks again,
Rob
admin 28
October 20 2008, 12:38 #15631
Show me a screenshot for your DB table structure with fields names...etc

does your table has a primary key ?

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!!
R
RobEnd 4
October 21 2008, 08:18 #15686
Here you go Max,
Another issue I have is I cannot find a database manager for Joomla 1.5 that works for me. Am I better off just using phpmyadmin externally?
cheers,
Rob

CREATE TABLE `merchandise` (
`catno` varchar(24) default NULL,`title` varchar(50) default NULL, `format` varchar(11) default NULL, `ID` int(11) NOT NULL auto_increment,`browse_image` varchar(50) default NULL, `description` blob, `supplier_cost` varchar(15) default NULL, `price` varchar(15) default NULL, `details` blob, `print_details` blob,`background_image` varchar(100) default NULL, `background_position` varchar(40) default NULL, `image01` varchar(50) default NULL, `image02` varchar(50) default NULL,`image03` varchar(50) default NULL,`background_positiondetails` varchar(50) default NULL,`size` varchar(20) default NULL, PRIMARY KEY (`ID`)) TYPE=MyISAM;
admin 28
October 21 2008, 09:32 #15691
I see no problems, which browser do you use ? can you make another connection to jos_banners and add some edit code too and see if it load the banners table records, or any joomla table with records you may have.

Regards,
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!!
GreyHead 64
October 21 2008, 09:44 #15697
Hi Rob,

EasySQL works well in Joomla 1.5 and the latest version is 1.5 native.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
R
RobEnd 4
October 21 2008, 13:16 #15706
Hi Again,
I tried the same thing with jos_banners and got exactly the same result. I have now noticed I cannot delete records either. If I click the delete button I get a warning alert box, press ok but nothing changes.
cheers,
Rob
admin 28
October 21 2008, 15:06 #15711
Hi Rob,

A new Connectivity version will be out in the next hours hopefully and you can try with it but I see no problems at your code, I think your MYSQL version is old too, maybe you should consider an upgrade ? but hold on until you try the new release, its much more stable with many more features!

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!!